How to Compress Images for Your Website
To compress images for a website: resize to the display size, use WebP or AVIF for the best compression, aim for under 200 KB per image, and use a tool like TrimrPix to batch-optimize before uploading.
Why image size matters for web performance
Images typically account for over 50% of a web page's total weight. Large, unoptimized images slow down page loads, hurt Core Web Vitals scores (especially Largest Contentful Paint), and lead to higher bounce rates.
Compressing images before uploading is one of the fastest ways to improve website performance.
Recommended image sizes for web
| Use case | Max width | Target file size | Format |
|---|---|---|---|
| Hero / banner | 1920 px | Under 200 KB | WebP / AVIF |
| Blog post image | 1200 px | Under 150 KB | WebP / JPEG |
| Thumbnail | 400 px | Under 50 KB | WebP |
| Product image | 800 px | Under 100 KB | WebP / JPEG |
Best formats for web images
WebP is the best default choice for web images. It offers 25–35% smaller files than JPEG with broad browser support (97%+). AVIF offers even better compression but has slightly less support. Use JPEG as a fallback when needed.
For a detailed comparison, see the Image Formats Guide.
Step-by-step workflow with TrimrPix
- Open TrimrPix on your Mac
- Drag and drop your images into the window
- Adjust the quality slider — 80% is a good default for web
- Click Optimize
- Upload the optimized images to your website
What to expect
Typical savings range from 40–80% reduction in file size. A 2 MB JPEG hero image often becomes 200–400 KB after optimization — with no visible quality difference at 80% quality.
Automating with Watch Folder
For ongoing workflows, set up a Watch Folder in TrimrPix. Any new images added to the monitored folder are optimized automatically — no manual steps needed.
Learn more in the Batch Image Compression guide.
Try TrimrPix
Compress images for your website in seconds. $1.99 on the Mac App Store.
Download on the App Store