Image optimisation

What size should images be for a website?

Export images at the largest width they are displayed, doubled for high-density screens. Here are typical sizes for heroes, article images and thumbnails, and how to measure your own.

The right image size for a website is the largest width the image is displayed at, doubled for high-density screens. For most sites that means about 1920–2560 px wide for full-width hero images, 1200–1600 px for images in an article column, and 600–800 px for card thumbnails.

There is no single correct size, because it depends on your layout. This guide gives typical sizes for common slots, shows how to measure your own, and explains how to serve the right size to each screen.

Last checked: October 2026.

Key takeaways

  • Size images to their largest displayed width × 2, not to the camera’s original resolution.
  • Full-width heroes: 1920–2560 px wide. Article images: 1200–1600 px. Thumbnails: 600–800 px.
  • Use srcset so phones download smaller versions than desktops.
  • Always set width and height attributes to prevent layout shift.
  • Logos and icons should be SVG, which has no fixed size at all.
Where the image appearsTypical display widthImage width to exportNotes
Full-width hero or banner1280–1920 px1920–2560 pxUse srcset; most visitors need far less
Image in an article column600–800 px1200–1600 px2× the column width
Half-width image beside text500–650 px1000–1300 px2× the displayed width
Card or grid thumbnail300–400 px600–800 pxCrop to a consistent ratio
Avatar or author photo48–96 px96–192 pxSquare, 2× the displayed size
Open Graph share imageVaries by platform1200 × 630 pxSee the OG image guide
Logo and iconsAnySVGVector, scales to any size
Favicon16–48 px in tabsICO + PNG setSee the favicon sizes guide

These ranges cover common layouts. Your own numbers come from your design, which is why measuring is worth two minutes.

How to find the size your layout needs

  1. Open the page in Chrome, Firefox or Safari at the widest layout you design for.
  2. Right-click the image and choose Inspect.
  3. Hover over the <img> element. The browser shows its rendered size, for example 760 × 507.
  4. Multiply the width by 2. That is the width to export: about 1520 px here.
  5. Check the narrowest layout too. If the image goes full-width on phones, a 390 px wide phone at 3× needs around 1170 px.

If an image is wider on a tablet than on a desktop, which happens with some grids, use whichever displayed width is largest.

Why double the width?

Most phones and many laptops have high-density screens, which use two or three device pixels for every CSS pixel. An image exported at exactly its displayed size looks soft on those screens.

Doubling covers 2× screens fully and looks good on 3× phones too. Going to 3× for every image roughly doubles the file size again over 2×, for a difference most people can’t see in photos, so many sites cap at 2×. Icons and text-heavy images benefit most from extra density, which is another reason to use SVG for them.

Serve different sizes with srcset

Exporting one large image for every screen wastes data on phones. With srcset you export several widths and let the browser choose:

<img
  src="/img/article-1200.webp"
  srcset="/img/article-800.webp 800w,
          /img/article-1200.webp 1200w,
          /img/article-1600.webp 1600w"
  sizes="(max-width: 800px) 100vw, 760px"
  width="1600" height="1067"
  alt="Describe the image">

The sizes attribute tells the browser how wide the image will be displayed, so it can pick the smallest file that’s still sharp. On a 390 px phone at 2× it downloads the 800 px version; on a desktop with a 760 px column at 2× it takes the 1600 px one.

WordPress does much of this for you. It creates several sizes from each upload (150, 300, 768, 1024, 1536 and 2048 px by default) and adds srcset automatically. It also scales down uploads larger than 2560 px.

Tip: Keep the width and height attributes even when CSS controls the size. The browser uses them to reserve space before the image loads, which stops the page jumping and protects your Cumulative Layout Shift score.

What about file size?

Dimensions decide most of the file size, and format and quality do the rest. As a rule of thumb, aim for content images well under 200 KB and full-width heroes under about 300–400 KB. A correctly sized photo saved as WebP at 75–85% quality usually lands there without trying.

If yours don’t, the guide to compressing images covers quality settings and metadata, and the WebP vs AVIF vs JPEG comparison explains which format to pick.

Common image sizing mistakes

  • Uploading straight from the camera. A 4000 px photo in an 800 px slot is many times heavier than it needs to be, even after the browser shrinks it on screen.
  • Exporting at exactly the displayed size. It looks fine on a standard monitor and soft on almost every phone.
  • Using CSS to crop instead of cropping the file. object-fit: cover is useful, but if a square thumbnail comes from a wide panorama, most of the downloaded pixels are hidden.
  • Saving logos as large PNGs. An SVG is sharper at every size and usually much smaller.
  • Forgetting the mobile layout. An image that is half-width on desktop often goes full-width on phones, so check both before choosing a size.

None of these are hard to fix once you know the target width for each slot.

Resize a batch to the right size

Once you know your widths, the bulk image resizer resizes a whole folder at once. Set the width, choose WebP or AVIF, and download every image as a ZIP. For thumbnails it can crop to an exact size, such as 800 × 600, so a grid lines up. Everything runs in your browser, so your images are never uploaded.