I’ve an svg image that lives inside a folder (which lives inside the content folder) like this:
content/
0_stuhl-one
/stapelstuhl-icon.svg
I’ve this code but the svg image is not being displayed even though I’ve uploaded it via the Kirby panel to show for this specific product:
<?php
$items = $stuehle->structurethree()->toStructure();
if (count($items) > 0) {
// Check if the Stapelstuhl image is uploaded for a specific product
$stapelstuhlImage = $items->first()->image()->toFile();
if ($stapelstuhlImage) {
// If the Stapelstuhl image is available, display it
echo '<img src="' . $stapelstuhlImage->url() . '" class="stapelstuhl">';
}
}
?>