Seitenreport Seitenreport
Media in Shopware

Resolve images without width/height in Shopware

Reserve the space for pictures before downloading. In Shopware, you check media allocation and thumbnail output.

Media assignment and thumbnail edition

Check the Twig markup of the affected media element. Own storefront adjustments can remove image dimensions even though the media data contains them.

Compare the original media with the preview images used in the storefront. Decisive is the really requested thumbnail URL in the respective layout, not only the file stored in the backend.

Where to check the setting in Shopware

Compare the media assignment of the product with the alt data and the actually selected thumbnail file. A large original is not automatically a problem if the theme loads a suitable small variant; the file requested in the browser is decisive.

Example of this specific finding

Illustrative control case: An image under the introduction does not reserve an area before downloading. As soon as it appears, the following text moves down.

<img src="produkt.webp" width="800" height="600"
     style="max-width:100%;height:auto" alt="Roter Rucksack, Vorderansicht">

follow-up audit in Shopware

Check a product image in listing, detail view and on mobile devices. After changes, also consider existing image variants and their cache.

Under throttled connection, the area before and after the image download remains the same. HTML dimensions and responsive CSS must reflect the same aspect ratio.

Derogations and scope

A space already reliably reserved by CSS can also solve the problem. Incorrect width/height values are not an improvement.

Related: Shopware 6 with Storefront. Self-hosted and SaaS offer different access and configuration options; view your own headless frontends separately.

Classify the general error

Definition, system-independent causes and further correction examples: Reserve the space for pictures before downloading

Configuration and test signal documentation

Shopware 6: Media of the product

W3C: Task and Alternative of an Image

web.dev: Optimizing image output

Related Media Mistakes in Shopware