imgglide

Optimize images for website pages: width, format and quality in order

A page is only as light as its heaviest pictures, and most of that weight is pixels nobody ever sees. This guide explains how to optimize images for website pages by deciding three things in a fixed order, then checking the kilobytes before you publish.

Last updated:

Why pictures decide how heavy a page is

Text, styles and scripts on a typical page add up to a modest amount of data. A handful of photographs can outweigh all of it together. A single phone picture straight from the camera may run 3 to 6 MB, and a page that shows ten of them asks every visitor to download tens of megabytes. On a slow mobile connection that is a long wait, and some visitors leave before the page has finished.

That is the practical reason to care about website image size. You do not need a score or a tool report to see it. Open the folder with your pictures, sort by size, and look at the biggest file. If it is far larger than the space it fills on the page, there is something to fix, and the fix is almost always one of three things.

Step one: find the width the picture really fills

Before touching any setting, decide how wide the picture appears on the page. A photo inside a text column might be shown 700 pixels wide. A full-width banner on a desktop screen might be 1400 or 1600. A small card image could be 300. Write the number down. Everything else follows from it.

Then multiply by two. Many screens pack two physical pixels into every pixel of layout, so a picture displayed 700 wide looks crisp when the file itself is about 1400 wide. Going beyond twice the display width rarely helps and always costs bytes. Going below it makes the picture slightly soft on sharp screens. Keep the original untouched in a separate folder, and work only on copies.

  • Image inside a text column: display width times two, often 1200 to 1600 pixels
  • Full-width banner: usually 2560 pixels is already generous
  • Thumbnails and cards: 400 to 800 pixels
  • Logos and icons: size them to the exact space, doubled
Advertisement

The arithmetic of cutting pixels

Pixel count grows with the square of the width. A camera picture of 4032 × 3024 holds about 12.2 million pixels. Scaled to 1600 × 1200 it holds about 1.9 million, which is roughly 84 percent fewer. The file shrinks by a similar proportion before any quality change, and nothing visible is lost at that display size, because the screen never had room for the extra detail.

That is why shrinking the width usually saves more than dragging the quality lower. It is also kinder: lowering quality adds blocky patches and smudges, while a smaller picture simply has fewer pixels that are all still clean. Do the width first, and only then look at quality.

Step two: choose JPG, PNG or WebP by what is in the picture

The file type should follow the content. Photographs, with smooth gradients and natural texture, suit JPG and WebP, both of which discard detail the eye hardly notices. Screenshots, charts and graphics with flat colors and sharp text suit PNG, which keeps every pixel but gets large when the picture is a busy photo. Anything with a transparent background needs PNG or WebP, because JPG has no transparency and turns clear areas white.

WebP is usually smaller than JPG at a similar look, and current browsers open it. If you must support very old software, keep JPG as the safe choice. Never save a photograph as PNG for a web page unless you have a reason; the file can be several times larger for no gain.

Step three: set quality, then compare KB

Quality only applies to the lossy types, JPG and WebP. In the compressor the ‘Quality’ slider starts at 75, a sensible place for web pictures, because the drop in size from 100 to 75 is large while the change on screen is small. In the converter the same slider starts at 90 and runs from 10 to 100.

Do not judge by the number alone. Convert, then look at the result at 100 percent zoom. Blocky skies, fuzzy edges around text and smeared skin say the value went too low; go up by five or ten. When the picture looks clean, note the size in KB and stop. Chasing a few more kilobytes by pushing quality lower rarely pays.

Optimize images for website use with the three tools, in order

Everything runs inside your browser, so the pictures are not uploaded, nothing is installed and no account is needed. The order below keeps the number of lossy saves low, because each lossy save costs a little detail.

  • Open the resizer, add the copies, keep ‘What to do’ on ‘Resize’, choose ‘Pixels’ under ‘Resize by’, tick ‘Keep aspect ratio’ and type the doubled display width in ‘Width’. Press ‘Resize’.
  • If a picture is in the wrong type, open the converter and choose JPG, PNG or WebP under ‘Convert to’. Press ‘Convert’.
  • Open the compressor, add the files and set ‘Quality’. If a width from its ‘Maximum width’ list fits, such as 1920 or 1280, you can use that and skip the resizer entirely.
  • Press ‘Compress’. Each row shows the old size, the new size and the percentage saved.
  • Press ‘Download’ for one file or ‘Download all (ZIP)’ for the batch.

What to check before you publish

Look at the sizes in your file manager, not only in the tool. A hero photo that ends up at a few hundred KB and small card images in the tens of KB are reasonable personal targets, not rules; your own page decides. If one file is still far above the rest, go back to the width.

Know the limits. The compressor returns the original with a note if it cannot make a file smaller. It works on JPG, PNG and WebP only, and it does not choose between formats for you. The resizer saves JPG and WebP at a fixed quality of 92, so a second pass through the compressor will compress further. Compressed files lose their EXIF data, such as camera model and location, which is useful for privacy but also removes the shooting date. None of this promises a particular loading time or search position; it only makes the files lighter.

Questions and answers

How do I optimize images for website pages without making them blurry?

Match the file width to the space it fills, at most about twice that width, then compress at a quality near 75 and look at the result at full size. Blur comes from too few pixels or too low a quality value, so check both.

What size should a website image be?

There is no single size. Measure the width the picture is shown at on the page and export about double that, for sharp screens. A picture shown 700 pixels wide is fine at roughly 1400.

Should I use JPG, PNG or WebP on a web page?

Use JPG or WebP for photographs, PNG for screenshots, charts and sharp text, and PNG or WebP when you need transparency. WebP is often smaller than JPG, and current browsers display it.

Can I upload the original camera photo and let the page shrink it?

The browser can display it smaller, but the visitor still downloads the whole file. Prepare a smaller copy and keep the original somewhere else.

Are my pictures sent anywhere when I use these tools?

No. Resizing, converting and compressing happen in your browser on your device. The tools are free, with no sign-up and no watermark.