How to Optimize WebP Images on Mac
Published · Updated
Before recompressing a WebP, check its pixel dimensions and file size. Resizing an oversized image may help more than another quality reduction. If you still have the original photograph or graphic, make the new export from that source.
Compare a new export without replacing the old one
- Keep the existing file and choose a separate output folder.
- In ExportForWeb, add the WebP and try Balanced or Smaller image quality.
- Compare dimensions and file sizes, then inspect the result at the displayed size.
- Replace the site asset only if the new version is smaller and still meets your quality needs.
Repeated lossy encoding can add artifacts. A higher quality setting can also produce a larger file without restoring detail. Google’s WebP FAQ describes this behavior.
Resize for the layouts you actually use
Use an image editor to make variants for your layout. Allow for high-density displays and any full-screen or zoom view. The same image may need a small card version and a larger article version.
For example, if an image fills the viewport up to 720 CSS pixels and occupies a 960-pixel column above that breakpoint:
<img
src="/images/workspace-960.webp"
srcset="/images/workspace-640.webp 640w,
/images/workspace-960.webp 960w,
/images/workspace-1440.webp 1440w"
sizes="(max-width: 720px) 100vw, 960px"
alt="A workbench beside the studio window"
width="1440" height="960"
loading="lazy" />
Adjust sizes to match your CSS, and keep the same aspect ratio across these files. The browser uses the layout hint and display density when selecting a source; it does not always choose the smallest file. MDN’s responsive images guide explains the selection.
Review the visible tradeoff
Read small text in screenshots. Check gradients for banding, faces for lost texture, and transparent shadows against the page background. Keep the existing image if another encode makes it worse without a useful size reduction.
See the PNG guide for transparent graphics or the JPEG guide for photographs. These checks matter more than which file was exported most recently.