Responsive images
Definition
Responsive images are the platform's answer to serving one upload at many sizes. Shopify's CDN resizes on request through image_url, and a theme emits the results as a srcset ladder with a sizes hint, or as a picture element when desktop and mobile need different art. Width and height attributes reserve the box before the file arrives, so layout doesn't shift.
Documented at https://shopify.dev/docs/storefronts/themes/best-practices/performance/platform.
How we've used it
The work is almost never the ladder — it's the sizes string, and getting it wrong is invisible until you look at what the browser actually downloaded. A card renderer that feeds a grid has to compute sizes from the column count, the container width and the gutter at every breakpoint, because the same card is four-up on desktop and one-and-a-half-up in a mobile carousel. A hand-built campaign module does the same arithmetic against its block count: a row of two value props needs a wider candidate than a row of four. The rest is discipline. One shared renderer per theme instead of per-section markup, an explicit ratio box so nothing reflows, and a separate art-directed source only where the mobile crop is genuinely a different photograph.
Builds using it
- Brand story split panel: one section that renders image, hosted video or YouTube with separate desktop and mobile assets — LUS Brands
- DE Hero: art-directed image/video hero with layout controls — LUS Brands
- Shop-by-category carousel with collection-aware card fallbacks — LUS Brands
- Font delivery and a template-conditioned image preload in a licensed theme's layout — Three Ships
- Press / trust logo strip with scroll-snap carousel and no JavaScript — LUS Brands
- Mega-menu header with separate mobile menu and image blocks — Three Ships
- Title-matched mega menu with a full-depth link-list fallback — Nudestix
- Homepage exclusive-offers rail with caption heights equalized in idle time — Nudestix
3 further gated builds use it; their pages follow.
Related entities
Deferred media · Deferred CSS loading · Liquid snippets · Intersection Observer API