Skip to content

Where your images are served from ​

On your store's Settings tab, under Image storage, your product images can be served two ways:

  • From our global image network (the default) — fast, and handled entirely for you.
  • From your store's own disk — the images live on your store's own volume instead.

Opening Image storage checks your store's actual setting, so the badge (image network or on your disk) is always current.

Most stores should keep the default. On your own disk, images load noticeably slower, and every image view counts against your monthly data transfer — most stores use it up far faster that way. ⚠️ Moving images off the network onto your own disk is also the riskier direction — your images are managed on the network — so switch only if you have a specific reason. The portal asks you to confirm, and your store stays online while the images move in the background. Use the image network switches back at any time.

While your images are on the network, you can choose whether their web addresses use our media host or your own domain. Once you've set up a custom domain for your store, a Serve media from custom domain option appears here: turn it on and your image links read as https://yourdomain.com/media/... instead of our default media host. Page-load speed is unaffected — the images still load from the same fast network once a page has been visited; only the address shown changes.

There is one trade-off to know: while this is on, images are also copied onto your store's own disk as they're served, so your store's backups and restores get slower — the more media your store has, the bigger the difference. And this doesn't reverse: turning it back off stops new images from being copied to disk, but the ones already there stay, so your backups don't shrink back. So if fast backups and restores matter more than branded image links, it's best to leave this off (the default) rather than turn it on and switch back later. The option only shows once you have a live custom domain (there's nothing to brand onto otherwise), and it doesn't apply while images are on your store's own disk.

Files your store regenerates (mutating files in /media/) ​

The image network caches files for speed. That's ideal for product images, but a file your store rewrites in place — such as an XML sitemap or a product feed under /media/ — could keep serving its old copy until the cache expires. Under Mutating files in /media/ you list those files, and they're always served fresh. Add a specific file (/media/sitemap.xml) or a pattern (/media/sitemap/sitemap*.xml); everything else stays cached normally. See also XML sitemap.

Referencing images in custom code or CMS content ​

If you add a custom theme, an extension, or CMS / Page Builder content that points at an image (or any file) in your media library, build the URL from your store's media base URL — never a hardcoded /media/... path. A hardcoded /media/... points at your store's web address, which bypasses the global image network: the image loads more slowly, and if your storefront is on your own custom domain it may not load at all.

  • In a theme or extension (block/template): build the URL from the media base URL — $store->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA). This is the same approach Magento's own logo uses, which is why the logo always loads from the image network.

  • In a CMS page, Page Builder, WYSIWYG editor, or an email template: use Magento's media directive — it resolves to the correct media URL for you:

    {{media url="wysiwyg/your-image.png"}}

Quick way to spot the mistake: if, on the same page, your logo loads from the image network but a hand-added image loads from your store's web address, that image is using a hardcoded path — switch it to one of the patterns above.