Image Compression Guide
Image compression is the process of making an image file smaller while trying to keep it visually useful. The best result usually comes from combining the right format, sensible dimensions, and an appropriate quality setting.
Start with dimensions
A photo from a modern phone may be 3000 to 6000 pixels wide. Most websites, emails, and forms do not need that many pixels. If an image will display at 800 pixels wide, uploading a 5000 pixel original wastes bandwidth and storage.
Resize first, then compress. This preserves more visible quality than using extremely low quality on an oversized image.
Choose the right format
JPG is good for photographs. PNG is good for screenshots, sharp graphics, and transparency. WebP is often a strong choice for websites because it can handle photos and transparency with smaller files in modern browsers.
Use quality settings carefully
Quality is not a universal measurement across all encoders. A setting of 80 is usually a good starting point for photos. Lower values reduce size but can introduce blocking, blur, and color artifacts. Higher values preserve more detail but increase file size.
Understand metadata
Images may include metadata such as camera model, capture time, and location. Browser re-exporting usually strips this metadata from the new file. This is useful when sharing personal photos or internal screenshots.
Recommended workflow
- Keep the original image as a backup.
- Resize the image to the largest dimension you actually need.
- Choose JPG for photos, PNG for transparent graphics, or WebP for web publishing.
- Compress at 80 quality and compare the result.
- Lower quality or dimensions only if the file is still too large.
Privacy-first compression
For sensitive images, local browser compression avoids sending the original file to a remote service. This is helpful for client work, internal documentation, personal photos, or any situation where upload-based tools are not appropriate.