Choose the right format
Use JPEG for photographs when broad compatibility matters, WebP for a strong balance of quality and size, and PNG for graphics that need lossless detail or transparency. Compare the result visually instead of choosing quality by file size alone.
Resize before compressing
A 4000-pixel image displayed at 800 pixels wastes bandwidth even after compression. Resize to the largest real display size, preserve the aspect ratio and then adjust quality. This order usually produces a smaller and sharper result.
Prepare complete icon sets
Favicons, app icons and social previews use different dimensions and crops. Start from a square, high-resolution source with safe margins. Export the required sizes and test them against both light and dark browser chrome.