compresshive
All articles

How Big Should Images Be on a Website?

Practical pixel dimensions and file sizes for website images, how high-density screens change the math, and why upscaling never adds detail.

· 7 min read

Images are usually the heaviest part of a web page, and the most common problem is not the format or the quality setting. It is uploading a 4000-pixel camera photo to show it in a box 800 pixels wide. The browser downloads every one of those pixels, then throws most of them away.

Why image size matters

  • Speed. Large images delay how quickly a page looks ready, especially on mobile data. The biggest image near the top of a page is often what Google measures as Largest Contentful Paint, one of its Core Web Vitals.
  • Data costs. Many visitors pay for mobile data or have monthly limits.
  • Storage and upload limits. Website builders, email and forms often cap file sizes.

Pixel dimensions vs file size

These are two different things. Dimensions are the width and height in pixels, such as 1920 × 1080. File size is how much space it takes, such as 350 KB. Dimensions have the bigger effect: the number of pixels grows with the square of the width, so a 2000-pixel-wide image has four times as many pixels as a 1000-pixel-wide one.

That is why resizing comes first, and compressing second.

The rule: display size × screen density

Work out the largest width the image is actually displayed at on your site, in CSS pixels. Then allow for high-density (“retina”) screens, which use two or three physical pixels per CSS pixel. Most phones and many laptops are 2× or more.

A practical rule is to export at about twice the displayed width. An image shown 600 pixels wide should be around 1200 pixels wide. Going to 3× rarely produces a visible improvement but adds a lot of weight.

Typical sizes

Image typeWidthTypical file size
Full-width hero or banner1920–2560 px150–500 KB
Image inside an article or blog post1200–1600 px80–250 KB
Product photo (with zoom)1500–2000 px100–300 KB
Card, grid or thumbnail400–800 px20–80 KB
Social share image (Open Graph)1200 × 630 pxunder 300 KB

Treat these as starting points. Your layout decides the real numbers: check how wide the image container gets at its largest, and double it. File sizes vary a lot with content; a busy landscape needs more bytes than a product on a white background.

Keep the aspect ratio

The aspect ratio is the shape of the image: width divided by height. If you change the width and height independently, the picture gets stretched or squashed. When resizing, set one side and let the other follow, or crop first if you need an exact shape like a square.

Enlarging does not add detail

Making an image bigger than its original pixel size cannot recover detail that was never captured. The software has to invent the new pixels by blending their neighbors, so the result is a larger file that looks soft or blurry. If you need a bigger image, go back to a higher-resolution original. That is why our image compressor only ever scales large images down when you set a maximum size.

Tips for developers

  • Always set width and height attributes (or a CSS aspect-ratio) so the page does not jump while images load.
  • Use srcset and sizes to offer a few widths, such as 640, 1280 and 1920, and let the browser choose.
  • Add loading="lazy" to images below the fold, but not to the main image at the top.
  • Serve WebP (or AVIF) where you can; it is usually smaller than JPG at the same quality.

A quick checklist

  1. Find the largest width the image is shown at, and double it.
  2. Resize to that width with the Resize Image tool, keeping the aspect ratio.
  3. Convert photos from JPG to WebP, or compress them as JPEG at 70–80.
  4. Check the result looks right and the file size is reasonable before uploading.

Try it on your own files

Free, no sign up, and you can compare the result before you download.