Blog › How to Compress Images for Faster Web Pages
How to Compress Images for Faster Web Pages
Published 2026-10-01
Images are often the heaviest part of a web page. Big files make pages load slowly, and slow pages frustrate visitors and can hurt your search performance.
Resize before you upload
A photo straight from a phone can be 4,000 pixels wide, but most blogs display images at 800 to 1,200 pixels. Resizing to the size you actually need is the biggest saving.
Choose the right format
- JPEG suits photos.
- PNG suits logos and screenshots that need sharp edges or transparency.
- WebP is smaller than both and works in modern browsers.
Use a quality of 70 to 80
For photos, a JPEG quality around 75 usually looks the same to the eye while cutting file size sharply. Compare before and after at full size to check.
Add alt text and a clear file name
Name files by what they show, such as blue-running-shoes.jpg, and add alt text that describes the image. This helps accessibility and image search.
Load images lazily
Add loading="lazy" to images below the first screen so the browser loads them only when needed.