You can assign media objects to the various entities in Shopware’s Storefront. For example, on the product detail page, this is frequently used to display more information with images. This guide should help you get started with using media and thumbnails in your Storefront plugin.
1. add the code to this location
custom/plugins/PluginName/src/Resources/views/storefront/element/CustomElementName.html.twig
{% set sliderConfig = element.fieldConfig.elements %} <div class="cms-custom-image"> {% set media = searchMedia([sliderConfig.media.value], context.context) %} {# @var item \Shopware\Core\Content\Media\MediaEntity #} {% for item in media %} <img src="{{ item.url }}"> {% endfor %} </div>