A hero image is usually one of the largest visual assets on a page, so sizing mistakes are expensive. An oversized hero can delay rendering and waste bandwidth. An undersized hero can look soft on large or high-density displays. A desktop crop can also fail completely on a narrow phone even when the pixel count is technically sufficient.
There is no single mandatory hero dimension. Shopify’s updated 2026 guidance uses 1280×720 as a representative 16:9 hero size and notes a broader 1280–2500-pixel width range, but the correct size still depends on the actual layout, crop, and responsive behavior.
Short version: begin with the hero’s rendered width and aspect ratio. Provide multiple source widths, avoid lazy-loading the likely LCP hero, and use a separate mobile crop when the desktop composition does not survive a narrow viewport.
Start with the hero container, not a stock dimension
Ask four questions:
- Does the hero span the viewport or sit inside a max-width container?
- What aspect ratio does the design use on desktop?
- Does mobile preserve that ratio or switch to a taller composition?
- How large is the image likely to render in CSS pixels at each breakpoint?
Those answers determine the source dimensions. A 1280×720 asset may be fine for a constrained hero. A full-bleed 1920 CSS-pixel desktop hero may need a larger high-density candidate. A phone may need a completely different crop rather than a scaled-down copy of the desktop file.
Practical desktop starting points
For many websites, these are reasonable starting ranges:
- Constrained hero: about 1200–1600 px wide.
- Full-width desktop hero: about 1600–2400 px wide as the largest candidate.
- Very wide display support: consider a larger candidate only when the layout can actually use it.
These are not requirements. If the hero container never exceeds 1200 CSS pixels, a 3000-pixel image may provide little practical value beyond a well-chosen 2×-ish candidate.
Mobile heroes often need art direction
A desktop hero usually has horizontal space. Mobile does not. Simply shrinking a 16:9 landscape image can make the subject tiny or allow text overlays to cover important content.
Two strategies work:
- Responsive crop with CSS: keep one source composition, use
object-fit: cover, and adjustobject-position. - Art-directed mobile source: create a tighter crop and choose it through
<picture>at a mobile breakpoint.
The second approach is better when the subject, product or focal point needs genuinely different framing.
What aspect ratio should a hero use?
16:9 is common because it is wide without becoming extremely shallow. It is not universally best. A content-heavy marketing page may use a shallower banner-like hero; an editorial page may use 3:2; a mobile hero may become 4:5 or another taller ratio.
The important point is consistency with the layout. Use the Aspect Ratio Guide to calculate proportional dimensions and avoid stretching.
Hero images and LCP
The hero is often the Largest Contentful Paint element, so it deserves different loading treatment from below-the-fold imagery. Our existing LCP image optimization guide covers discovery, priority and delivery in depth.
One key rule: do not lazily load an image that is likely to be the above-the-fold LCP element. The browser should discover it early. See Why You Shouldn’t Lazy Load Your Hero Image.
Use srcset instead of one giant hero
Suppose a desktop hero can render at 1440 CSS pixels while mobile is around 390 CSS pixels wide. One 2400-pixel file served to every device is wasteful.
A desktop crop could offer 960w, 1440w and 2400w candidates. A mobile crop could offer 480w, 800w and perhaps 1200w. The browser can select the closest useful source according to the slot and display density.
Should a hero be 2× its display width?
A 2× source is a useful planning heuristic for high-density screens, not a universal delivery rule. A 1440 CSS-pixel hero at 2× would imply a 2880-pixel source, which may be more than many pages need once compression, viewing distance, image content and actual device behavior are considered.
Responsive candidates are better: include a sufficiently large option, but do not force it on visitors whose screens or layouts do not need it.
Keep text out of the raster when possible
If the hero includes a headline, button or critical promotional message, render that content as HTML when practical instead of baking it into the image. HTML text remains accessible, responsive and crisp, and the visual can crop without cutting the message.
If text must be embedded in the image, protect a safe area and test the crop at every breakpoint.
Focal points matter more than the exact pixel number
A technically sharp hero can still fail if the subject is hidden behind navigation, clipped on mobile, or covered by the headline. Establish a focal point before generating derivatives.
For object-fit: cover, object-position can bias the visible region toward that focal point. For more dramatic changes, art-direct the source.
Hero file size should be budgeted, not guessed
A hero deserves more bytes than a tiny card because it occupies more visual area, but the goal is still to remove waste. First fix dimensions, then choose an efficient format, then tune quality.
Use Best Image Format for the Web and Image Compression Quality Settings after the crop and dimensions are correct.
Worked example: desktop + mobile hero
Imagine a homepage where the desktop hero is 1440×810 in the design and the mobile hero is a taller crop around 390×520 CSS pixels.
Desktop composition: create a 16:9 crop from the master. Provide candidates such as 960w, 1440w and 2400w.
Mobile composition: create a second crop that keeps the product large and preserves negative space for text. Provide perhaps 480w, 800w and 1200w.
Use <picture> to switch compositions and srcset inside each source family for resolution selection. Set intrinsic dimensions so layout space is reserved before load.
Hero image checklist
- Measure the real hero slot on desktop and mobile.
- Choose the composition and ratio for each breakpoint.
- Create separate mobile art direction when needed.
- Generate a small set of source widths from the master.
- Do not lazy-load the likely LCP hero.
- Keep critical text in HTML when possible.
- Set intrinsic width and height.
- Compress after dimensions are correct.
- Verify the chosen source in DevTools on representative devices.
Prepare a hero image
Use the browser image tool to resize the final crop into the source widths your design needs, then choose WebP, AVIF, JPEG or PNG and tune quality before download.
Frequently asked questions
Is 1920×1080 the best hero image size?
It is a common 16:9 size, but not a universal best. Your actual container may be narrower, wider, shallower or taller.
What hero size should I use on mobile?
Start from the mobile component width and composition. Many mobile heroes benefit from a tighter or taller crop rather than a miniature desktop landscape image.
Should the hero be lazy loaded?
Usually not when it is visible above the fold and likely to be the LCP image. Delaying its discovery can hurt loading performance.
Can desktop and mobile use different hero images?
Yes. HTML <picture> is designed for art direction when different conditions need different source images.
Sources and further reading
- Shopify: Website Image Size Guidelines for 2026
- Shopify: Website Hero Image Best Practices (2026)
- MDN: Responsive images
- MDN: <picture>
Image Resizing & Dimensions
A practical series on choosing, resizing, cropping, and delivering the right image dimensions for the web.
- Image Resizing: The Complete Guide to Dimensions, Resolution and Aspect Ratio
- How to Resize an Image Without Losing Visible Quality
- Crop vs Resize: What’s the Difference?
- Aspect Ratio Explained: How to Resize Images Without Stretching Them
- Best Image Size for a Website: Hero, Banner, Blog and Content Images
- Best Hero Image Size for Desktop and Mobile
- Pixels vs Resolution vs File Size: What Actually Matters on the Web?
- Does DPI Matter for Web Images? The 72 DPI Myth Explained