October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Core Web Vitals

Best Image Sizes for Website Hero Images: A Responsive, Core Web Vitals-Friendly Guide

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a full-width website hero, start with a 1920×1080 (16:9) master, keep the composition at least about 1.7:1 wide, and export responsive candidates such as 480w, 800w, and 1200w. Deliver those candidates with srcset and sizes, use AVIF or WebP with a fallback, reserve the image’s space with intrinsic dimensions, and load an above-the-fold hero eagerly because it is often the page’s Largest Contentful Paint (LCP) image.

That is a practical baseline, not a universal pixel rule. The correct file depends on the hero slot’s rendered width, aspect ratio, crop, device-pixel ratio (DPR), and whether mobile needs different art direction.

What size should a website hero image be?

A 1920×1080 image is a defensible desktop starting point for a full-width 16:9 hero. The U.S. National Science Foundation’s author-tools guidance documents that size and also lists 1366×768 as a lower-detail option with the same ratio. Use the larger master when the image spans a wide desktop viewport or needs high-DPR detail; use the smaller source only when your layout and performance budget support it.

Do not treat 1920 pixels as the width every visitor must download. Generate several derivatives and let the browser select one that matches the actual slot:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
Candidate Typical purpose How to use it
480w Narrow phones or small cards Include in srcset for small viewport slots.
800w Phones, tablets and medium layouts Useful when a hero occupies most of a tablet or a constrained content column.
1200w Large tablets and many desktop slots Chrome’s official responsive-image example uses this candidate.
1600w–1920w Wide desktop or high-DPR displays Add when the rendered slot is wide enough to justify it.

The browser uses the rendered slot width, DPR and your sizes declaration to choose among these files. A single oversized 1920×1080 download wastes bytes on a 390-pixel phone; a single small file becomes soft on a wide, dense display.

Choose the aspect ratio and protect the crop

Sixteen by nine is a useful baseline because it is familiar and gives a broad desktop composition. It is not mandatory: a shallow banner, a split hero, or a component inside a fixed-height card may need another ratio. Measure the real container before exporting.

Keep important subjects, logos and text away from edges that may be clipped. The NSF guidance says to aim for at least 1.7:1 (width:height) for hero images. A wider composition gives CSS more room to crop with object-fit: cover without cutting off the focal point.

When 16:9 works

  • Full-width desktop heroes with a predictable 16:9 visual area.
  • Photography where the main subject can remain near the center or within a safe zone.
  • Layouts that use the same source across desktop and tablet without aggressive height changes.

When to use a different ratio

  • A short promotional banner where a 16:9 image would create unnecessary vertical space.
  • A product hero whose text and image sit in separate columns.
  • A mobile layout that needs a tall, tighter crop to keep the subject visible.

Set the rendered aspect ratio deliberately with CSS or an aspect-ratio container, and test the crop at the breakpoints where your header, text and call-to-action change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Desktop and mobile: one image or two?

Use one responsive source when the same composition survives every viewport. Use a mobile-specific crop when the desktop framing becomes unusable on a narrow screen. The HTML <picture> element provides art direction: the browser selects a different image file, not merely a different width of the same crop.

<picture>
  <source
    media="(max-width: 700px)"
    srcset="/images/hero-mobile-480.avif 480w,
            /images/hero-mobile-800.avif 800w"
    sizes="100vw"
    type="image/avif">
  <source
    srcset="/images/hero-desktop-800.avif 800w,
            /images/hero-desktop-1200.avif 1200w,
            /images/hero-desktop-1920.avif 1920w"
    sizes="100vw"
    type="image/avif">
  <img
    src="/images/hero-desktop-1200.jpg"
    srcset="/images/hero-desktop-480.jpg 480w,
            /images/hero-desktop-800.jpg 800w,
            /images/hero-desktop-1200.jpg 1200w,
            /images/hero-desktop-1920.jpg 1920w"
    sizes="100vw"
    width="1920"
    height="1080"
    alt="Description of the hero scene"
    fetchpriority="high"
    decoding="async">
</picture>

The fallback <img> keeps the markup usable in browsers that do not select the modern source. Change sizes if the hero is not actually full viewport width—for example, use (max-width: 900px) 100vw, 900px for a component capped at 900 CSS pixels.

Responsive image markup that avoids waste

For a full-width hero without a separate mobile crop, this is a complete pattern:

<img
  src="/images/hero-1200.jpg"
  srcset="/images/hero-480.avif 480w,
          /images/hero-800.avif 800w,
          /images/hero-1200.avif 1200w,
          /images/hero-1920.avif 1920w"
  sizes="100vw"
  width="1920"
  height="1080"
  alt="A cyclist riding beside a coastal road"
  fetchpriority="high"
  decoding="async">

Generate the same width set in WebP and retain a broadly compatible fallback such as JPEG or PNG. AVIF and WebP generally offer smaller files than legacy formats, but compatibility and your image pipeline still matter; the fallback belongs in the src or a <picture> branch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why sizes matters

srcset lists available widths. sizes tells the browser how wide the image will render under each condition. If you omit it, the browser may assume the image is as wide as the viewport and download a larger candidate than necessary. Describe the CSS layout, not the source file’s intrinsic width.

Why explicit dimensions matter

Set width and height to the source image’s intrinsic dimensions, or provide an equivalent CSS aspect ratio. The browser can reserve the correct space before the bytes arrive, reducing cumulative layout shift (CLS). If a mobile source has a different ratio, give each art-directed image dimensions that match its own ratio and keep the container’s responsive behavior intentional.

Loading priority and LCP

An above-the-fold hero commonly becomes the LCP element. Do not lazy-load that image: loading="lazy" can defer the resource the user needs to see first. Use normal eager loading (the default) and consider fetchpriority="high" when it is the page’s clear LCP candidate. Do not mark every image high priority; competing high-priority requests can cancel out the benefit.

Preload only when your framework and measurements show it helps, and make the preload URL, media condition and format match the image actually selected. Otherwise you can cause an unnecessary duplicate request. Keep the hero’s HTML discoverable early in the document and avoid injecting it only after client-side JavaScript runs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Measure the result

  1. Run Lighthouse in a representative mobile profile and inspect the LCP element.
  2. Check the properly-sized-images audit to find candidates that are much wider than their rendered slots.
  3. Use field monitoring, not only a local run, because network speed, device class and cache state change LCP.
  4. Use the Core Web Vitals targets as a guide: LCP at or below 2.5 seconds, INP under 200 milliseconds and CLS under 0.1 are Google’s “good” thresholds.

If LCP is slow, inspect server response time, image discovery, compression, CDN caching and competing fonts or scripts—not just pixel dimensions.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Format, compression and transparency decisions

AVIF or WebP with a fallback

Serve AVIF or WebP candidates where your delivery stack supports them and keep a fallback for compatibility. Test visual quality at the compression level you intend to deploy: a smaller file is not an improvement if faces, text baked into the image or fine product details become visibly damaged.

JPEG, PNG and transparent heroes

JPEG remains a practical fallback for photographic heroes. PNG is appropriate when lossless detail or transparency is essential, but a photographic PNG can be unnecessarily heavy. If the hero is a cutout over a colored background, verify that your chosen format preserves the required alpha channel.

Do not resize with CSS alone

CSS can display a 1920-pixel source at 600 CSS pixels, but it does not reduce transfer bytes. Resize and encode derivatives at the widths you actually advertise. Keep an original master outside the delivery path for future crops and re-encoding.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A production workflow for sizing a hero image

  1. Measure the component. Record its maximum rendered width, desktop and mobile heights, and whether it is full bleed or inside a capped wrapper.
  2. Choose a safe composition. Start with a 1920×1080 master for a wide desktop hero, keep the focal content inside a crop-safe area, and target at least 1.7:1 when the design permits.
  3. Create candidates. Export 480w, 800w and 1200w, then add 1600w or 1920w when the desktop slot or DPR warrants it. Create a separate mobile crop if needed.
  4. Encode modern and fallback formats. Produce AVIF or WebP plus a fallback, checking quality at the actual display sizes.
  5. Write accurate markup. Add srcset, a layout-based sizes value, fallback src, intrinsic dimensions, descriptive alternative text and eager/high-priority loading for an above-the-fold hero.
  6. Test every breakpoint. Check subject visibility, text contrast, cropping, keyboard focus around overlay controls and the absence of layout jumps.
  7. Measure in the field. Review Lighthouse and real-user Core Web Vitals, then adjust candidates, compression or request priority based on observed bottlenecks.

Common mistakes and fixes

Symptom Likely cause Fix
Hero looks blurry on desktop Only a small candidate is available, or the browser selected it because sizes is wrong. Add a sufficiently wide candidate and describe the real slot in sizes.
Phone downloads a huge file One 1920-pixel file is used, or sizes is missing. Publish width candidates and a mobile-accurate sizes rule.
Subject is cut off on mobile Desktop crop is being forced into a narrow container. Use a mobile <picture> source with a deliberate crop.
Text jumps after load No intrinsic dimensions or reserved aspect-ratio space. Set width/height or an equivalent aspect ratio.
LCP is late Hero is lazy-loaded, discovered late, oversized, or competing with scripts and fonts. Remove lazy loading, use measured priority, reduce bytes and eliminate request contention.
Modern format is not displayed Missing fallback or incorrect type/source markup. Keep a working <img> fallback and verify response content types.
Image appears stretched Rendered ratio does not match the source and no crop rule is defined. Set the intended aspect ratio and use object-fit: cover only when cropping is acceptable.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need a screenshot of a finished page rather than an image asset, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers.

One GET request returns PNG, JPEG, WebP or PDF. The API supports full-page captures with lazy images loaded, CSS-selector element captures, dark mode, device presets and custom viewports, retina scale, PDF paper settings and page ranges, custom CSS and JavaScript, clicks, selector or network-idle waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration.

See the ScreenshotNeo documentation for authentication and options. cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

An MCP server lets Claude, Cursor and other MCP clients call take_screenshot, get_page_info and capture_pdf. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots, and every feature is available on every plan. Sign up for the free ScreenshotNeo plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Should a hero image always be 1920×1080?

No. That is a practical full-width desktop baseline. Your component’s rendered width, ratio, crop and DPR determine the candidates you should deliver.

Can I use one hero file for desktop and mobile?

Yes, when the composition remains readable and the subject survives the crop. Use a mobile-specific <picture> source when it does not.

Is loading="lazy" appropriate for a hero?

Not for an above-the-fold hero that is likely to be LCP. Load it eagerly and verify the effect with measurement.

What does sizes="100vw" mean?

It tells the browser that the image will render at roughly the viewport width. Replace it with a media-condition expression when the hero is capped or occupies only part of the layout.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 1
HTML and CSS: Design and Build Websites
HTML and CSS: Design and Build Websites
HTML CSS Design and Build Web Sites; Comes with secure packaging; It can be a gift option
$14.18
SaleBestseller No. 3
SaleBestseller No. 4
Web Design with HTML, CSS, JavaScript and jQuery Set
Web Design with HTML, CSS, JavaScript and jQuery Set
Brand: Wiley; Set of 2 Volumes
$35.05

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.