Why Shopware media storage grows out of control
A Shopware 6 catalog rarely stays small. Every product image you upload lands in public/media/ under a hashed directory structure, and for each original Shopware generates a full set of thumbnails stored in public/thumbnail/. The default thumbnail configuration attached to the standard media folders produces several sizes per image — commonly 400×400, 800×800, and 1920×1920 — so a single 2 MB product photo can expand into four or five derivative files. Multiply that across a few thousand SKUs with multiple gallery images each, and you are suddenly holding tens of thousands of files consuming both raw disk space and, more importantly on shared hosting, inodes.
Inodes are the hidden ceiling on managed shared plans. CloudLinux enforces a per-account inode quota, and Shopware's media tree is one of the fastest ways to hit it because thumbnails are tiny files counted individually. You can be nowhere near your storage limit in gigabytes and still have uploads fail, caches refuse to write, or the admin throw cryptic write errors because the account has run out of inodes. The symptoms show up in the local error log — typically ~/public_html/var/log/ for a Shopware install, or the per-domain error_log that cPanel and DirectAdmin surface in File Manager.
The second driver of bloat is format. Shopware stores whatever you upload. If your merchandising team exports uncompressed PNG or high-bitrate JPEG straight from design software, every derivative inherits that weight. Modern browsers decode WebP and AVIF at a fraction of the byte size, and Shopware 6 supports generating these formats natively through its media system — but only when the underlying PHP build has the right image libraries compiled in. On managed hosting you cannot install libraries, so the practical work is selecting a PHP version that already ships them and then telling Shopware to use them.
Preparing PHP: extensions, memory, and upload limits
Shopware's thumbnail pipeline relies on the GD extension (or Imagick, if your plan offers it). WebP support in GD has been standard since PHP 7.3, and AVIF encoding requires PHP 8.1 or newer built against a recent libavif. On Hostiso's AlmaLinux/CloudLinux stack you control this through the PHP Selector (DirectAdmin: PHP Selector → Extensions) or cPanel's MultiPHP Manager paired with Select PHP Version → Extensions. Set the account to PHP 8.2 or 8.3 for the best AVIF coverage, then confirm that gd (or imagick) and fileinfo are enabled.
Verify what is actually available rather than assuming. Create a temporary file in File Manager, for example public_html/_phpcheck.php, containing a single <?php phpinfo(); call, load it in the browser, search for the gd block, and confirm WebP Support and AVIF Support read enabled. Delete the file immediately afterward so it is never left exposed.
Image processing is memory-hungry. Resizing a large source image can spike well past the default 128 MB. Because you have no shell access, raise the limits with a .user.ini file in your document root (the same directory as Shopware's index.php, usually public_html/public/ or public_html/ depending on how the install was laid out):
; ~/public_html/public/.user.ini
memory_limit = 512M
max_execution_time = 300
upload_max_filesize = 32M
post_max_size = 36M
max_file_uploads = 40LiteSpeed reads .user.ini natively, but changes are cached. Allow a few minutes, or recycle the setting by touching the file again. These values matter most when you later run a bulk thumbnail regeneration, which processes the entire catalog in one pass and will exhaust a low memory ceiling partway through, leaving a half-built thumbnail set behind.
Controlling thumbnail sizes and enabling WebP/AVIF
The single biggest storage win is reducing how many derivatives Shopware creates. In the admin, go to Settings → Shop → Media to review thumbnail sizes, and open Content → Media to inspect individual folders. Each media folder has its own configuration under the folder's settings: a list of thumbnail sizes and a quality value. If your storefront theme only ever displays images up to roughly 800 px wide on product detail and 400 px on listings, the 1920×1920 derivative is dead weight on every image. Remove sizes you do not render. Trimming from five sizes to three cuts both inode count and disk usage by a large margin across the whole catalog.
Quality is the next lever. The default JPEG/WebP quality sits around 80; dropping product-gallery folders to 72–75 is visually indistinguishable at typical display sizes while meaningfully shrinking files. Set this per folder so hero banners can stay higher quality than thumbnail grids.
To switch output to WebP or AVIF, Shopware uses the shopware.media.* configuration. On shared hosting you cannot edit server config, but you can drop a project config file inside the application. Create config/packages/zz-media.yml (the zz- prefix ensures it loads last and wins):
shopware:
media:
enable_file_type_whitelist: true
url_upload_max_size: 0
filesystem:
public:
type: "local"Thumbnail format itself is driven by the source and by extension availability; the reliable account-level approach is to upload sources as WebP where possible and let Shopware carry the format through. After changing thumbnail sizes or quality, regenerate. Because console access is restricted on shared plans, the dependable path is the admin: Settings → System → Caches & indexes, then clear caches, and use the media thumbnail generation action exposed per folder. If your plan permits scheduled tasks via cPanel Cron Jobs with the PHP CLI binary, you can also invoke bin/console media:generate-thumbnails, but run it with a long execution window and watch var/log/ for memory failures.
Before regenerating en masse, delete stale derivatives so you are not doubling up. The orphaned thumbnails from removed sizes can be cleared in File Manager under public_html/public/thumbnail/, or more safely via the media cleanup task. Clearing first, then regenerating, gives you an accurate new inode footprint.
Offloading delivery with a CDN and keeping storage lean
Even a well-tuned media tree still competes with PHP for the same LiteSpeed workers every time a browser requests an image. A CDN removes that load by serving static assets from edge nodes, and Shopware integrates cleanly through a configurable asset URL. In Settings → Shop → Media (or via config) you can set the public media and thumbnail base URL to a CDN hostname that pulls from your origin. Point the CDN's origin at your domain, enable it as a pull zone, and set a long cache TTL on /media and /thumbnail paths. Reinforce that caching at the origin with rules in your document root .htaccess so LiteSpeed sends correct headers to the CDN:
# ~/public_html/public/.htaccess
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/avif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(webp|avif|jpe?g|png|gif|svg)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
</IfModule>True object storage offload (S3-style remote filesystems) is possible in Shopware through flysystem adapters, but it requires composer-installed adapter packages and credentials management that go beyond what an unprivileged shared account can reliably maintain. Unless your plan explicitly ships the adapter, keep media local and lean on the CDN for distribution. That combination — fewer thumbnail sizes, WebP/AVIF output where PHP supports it, long-lived cache headers, and a pull-zone CDN — delivers most of the benefit of remote storage without the operational risk.
Finally, make cleanup routine. Deleted products leave orphaned media; use the admin media cleanup and periodically review inode usage in cPanel's Disk Usage or DirectAdmin's account stats. Watching the inode trend after each catalog import tells you quickly whether your thumbnail configuration is sustainable or quietly heading back toward the quota ceiling.