Lighthouse flags 'efficiently encode images' on my site. What does it want?
It wants the listed images re-encoded at a sensible quality. The finding points at images that would shrink noticeably at a normal compression level, usually JPEGs exported at maximum quality from design software or uploaded straight from a camera. Run them through the compressor as JPEG at 75 to 85, confirm the saving in the table, upload the new files and run the report again.
How this differs from the next-gen formats finding
The next-gen formats finding says: switch JPEG to a newer format. This one says something else: even in the same format, your image is stored wastefully. The report compares each image with its expected size at a standard compression level, and if the gap is noticeable it lists the image with an estimated saving. So the fix is a lower quality in the same format, with no need to change the links on your site. The name and placement of this finding can vary between report versions.
Example: an image exported at maximum quality
A 1600×1200 image saved as JPEG at quality 100, as happens when you export with a 'maximum quality' option: 1.85 MB.
Re-encoded in Chrome at quality 80: 251.9 KB, 86.7% smaller.
At quality 75: 201.9 KB, 89.4% smaller.
One image like that at the top of your home page can outweigh the rest of the page put together. Yet the visual gap between quality 100 and quality 80 is hard to spot in a photograph on an ordinary screen.
Fixing it, step by step
- Open the report and note the image names listed under this finding, along with the estimated saving for each.
- Get the original versions of those images. If all you have is the uploaded copy, download it from your site.
- Add them to the Image compressor, choose JPEG so the links keep the same extension, and start at quality 80.
- Check the preview, especially banner images with text, and raise the quality to 85 if letters look hazy.
- Download the files and rename them back to their old names if you will replace them on the server directly, because the tool adds -compressed to the name.
- Upload them over the old ones, clear the site's cache if it has one, and run the report again.
If an image stays in the report
- Make sure the site is really serving the new file, not an old copy from a cache or a content delivery network.
- If the problem is dimensions larger than the display space, that is a different finding, fixed by resizing with the Image resizer.
- If the image is a photographic PNG, converting it to JPEG or WebP in the compressor saves a lot, but its extension changes and you must update the link.
Common questions
Is quality 80 right for every image on the site?
It is a good starting point for photographs. Banners with small text may need 85 or more.
Does the tool work on my site's images directly?
No, it processes files on your device only. Uploading them to the site is a step you take.
One file got bigger after compressing. What does that mean?
It was already well compressed and is probably not the one the report meant. Keep the original.
