A step-by-step routine for getting an image ready for the web: what order to do things in, what numbers to aim for, and how to check you got it right.
Images often take up more than half of a webpage’s total size. When images are too large, they slow down your website and hurt user experience.
This guide is about the routine. If you want the detail on which format to reach for and why, the JPEG vs PNG vs WebP guide covers that side.
Decide the format before you compress, because it caps how small the file can get. A quick rule that covers most cases:
For the full picture, including AVIF and browser support, see the JPEG vs PNG vs WebP guide.
Resize the image to the largest width it is actually shown at, then account for high-density screens by exporting at roughly twice that. A photo shown in an 800px column only needs to be about 1600px wide; anything past that is bytes the visitor downloads and never sees. Rough targets:
With the format and size settled, compression is the last squeeze. For photos, JPEG or WebP quality in the 60–80% range drops the file a lot while staying hard to tell apart from the original at normal zoom. Above 85% the file grows fast for a difference most people cannot see. Preview the result before you save it, and keep the original in case you need to redo it.
loading="lazy" to images below the fold, but not to the hero image.srcset and sizes so phones do not download the desktop image.Done in this order, getting one image ready for the web takes under a minute and is usually the cheapest speed win a page has.
Run your images through the ImageFixPro compressor and converters in the order above, all in the browser, then re-check the page in Lighthouse.
Optimize Images Now