Image Resizer

Change a photo’s width and height in pixels or by percentage, for a web page, an email or a form with a size limit. The photo is resized on your computer and never uploaded.

How to Resize Images for the Web: Sizes, Retina, srcset and Quality

The most common cause of a slow website is not code. It’s images that are far bigger than they need to be. A photo straight from a phone is typically 4000 × 3000 pixels and 3–6 MB. On a web page it might be displayed 800 pixels wide. That means the browser downloads over twenty times more pixels than it can show, then throws them away. Resizing is the first and most effective image optimization, before compression or format choice.

Mountain lake photo resized from 4000 to 1600 and 800 pixels wide for faster web pages

Pixels are what count

File size grows roughly with the number of pixels. Halving the width and height of an image removes three quarters of its pixels:

DimensionsPixelsRelative pixel count
4000 × 300012,000,000100%
2000 × 15003,000,00025%
1600 × 12001,920,00016%
1000 × 750750,0006%

Compression settings and formats matter, but nothing reduces weight as dramatically as not sending pixels nobody sees.

Find the display size

To choose a size, find the largest width at which the image is actually displayed. Right-click the image in your browser, inspect it, and look at its rendered width in CSS pixels. A blog layout with a 760px content column displays images at up to 760px; a full-width hero on a large desktop might be 1920px or more.

Account for high-density screens

Most phones and many laptops have a device pixel ratio (DPR) of 2 or 3, meaning each CSS pixel is drawn with 2×2 or 3×3 physical pixels. An image displayed at 760 CSS pixels needs about 1520 pixels of width to look perfectly sharp on a 2x screen.

Display width (CSS px)1x asset2x asset3x asset
360 (phone, full width)3607201080
760 (article column)76015202280
1280 (wide hero)128025603840

For photos, 2x is usually the sweet spot. The visible gain from 3x photographs is small, and the file size cost is large. For logos and icons, use SVG instead, which is sharp at any density. You can check your own screen’s DPR with our screen resolution checker.

Serve the right size to each device: srcset

A single 2x image is too heavy for small phones and possibly too small for large desktops. HTML’s responsive image attributes let the browser choose:

<img
  src="photo-1280.webp"
  srcset="photo-640.webp 640w, photo-1280.webp 1280w, photo-1920.webp 1920w"
  sizes="(max-width: 800px) 100vw, 760px"
  width="1280" height="853"
  alt="Team at work in the studio">
  • srcset lists the available files and their widths.
  • sizes tells the browser how wide the image will be displayed at different screen sizes.
  • The browser combines that with the device’s DPR and picks the smallest file that looks sharp.

Three widths (for example 640, 1280 and 1920) cover most layouts well. Always include width and height attributes (or CSS aspect-ratio) so the browser reserves space and the page doesn’t jump as images load. We explain why in our article on layout shift and placeholder images.

Quality when resizing

Downscaling (making images smaller) keeps them sharp, as long as the software uses good resampling. Browsers’ canvas drawing with imageSmoothingQuality = "high" and design tools like Photoshop use resampling filters that average neighbouring pixels to avoid jagged edges and shimmering patterns.

Upscaling (making images larger) can’t add detail that isn’t there. A 600px image stretched to 1200px looks soft. AI upscalers can invent plausible detail, but for professional work, start with a large enough original.

A few practical rules:

  • Resize from the original, not from an already-reduced copy.
  • Crop before resizing, so you keep as many useful pixels as possible.
  • Keep an untouched original; resizing down is destructive.

How much resizing alone saves

Here are the same three 12-megapixel photos (4032 × 3024) resized to common widths with Chrome’s encoder, keeping the quality fixed at WebP 75 so only the dimensions change:

WidthPhoto 1Photo 2Photo 3
4032 (original size)1.20 MB1.54 MB1.99 MB
2400552 KB565 KB931 KB
1600239 KB173 KB384 KB
1200160 KB116 KB251 KB
80067 KB52 KB100 KB

Halving the width roughly quarters the file, because the pixel count falls with the square of the width. Photo 3, a pine forest full of needles and bark, stays the heaviest at every size, while photo 2, a dog against a soft blurred background, is the lightest from 1600px down. Fine detail costs bytes at any resolution; out-of-focus areas are nearly free. For a blog column around 800 CSS pixels wide, a 1600px file covers 2× screens, and in this test that meant 170–390 KB instead of 1.6–2.4 MB.

Resizing versus compressing versus converting

StepWhat it doesTypical saving on a phone photo
Resize 4000px → 1600pxRemoves pixels70–85%
Compress (quality 75–80)Removes detail you can’t seeAnother 30–60%
Convert JPEG → WebPMore efficient encodingAnother 25–35%

Combined, a 4 MB photo often ends up at 150–250 KB with no visible difference at its display size. Resize first, then compress, and choose the right format.

Common target sizes

UseSuggested width
Full-width hero (desktop)1920–2560px
Blog or article image1200–1600px
Product image with zoom2000px+
Thumbnail or card400–800px
Email newsletter image600–1200px (displayed at 600)
Open Graph link preview1200 × 630px

For social platforms, each network has its own sizes; see our social media image sizes guide.

How resizing helps SEO

Google’s Core Web Vitals include Largest Contentful Paint (LCP), which is often an image. Smaller files load faster, improving LCP and the overall experience. Lighthouse and PageSpeed Insights flag “Properly size images” when you serve images much larger than their display size.