Saving Photos for the Web as GIF/PNG
Master Photoshop GIF and PNG Web Optimization
Web Image Format Fundamentals
JPEG Optimization
Photographs and images with many colors optimize better as JPEGs due to their compression algorithm designed for continuous tone images.
GIF/PNG Optimization
Files with few colors or areas of flat solid color are ideal for GIF or PNG compression, providing superior results for graphics and logos.
Pre-Optimization Preparation
Verify Image Settings
Ensure your image is in RGB mode at 72 ppi for optimal web display and processing.
Trim Empty Pixels
Use Image > Trim to automatically remove empty pixels and reduce file size before optimization.
Access Save for Web
Navigate to File > Export > Save for Web (Legacy) to begin the optimization process.
GIF Color Limitation
Color Palette Options
| Feature | Palette Type | Characteristics |
|---|---|---|
| Adaptive | Based on actual image colors | Analyzes source image |
| Selective | Based on actual image colors | Prioritizes common colors |
| Perceptual | Based on actual image colors | Optimized for human perception |
| Preset Palettes | Fixed color sets | Not recommended for most cases |
GIF transparency does not allow for partial transparency. Any partially transparent pixels must become completely opaque, requiring careful matte color selection for smooth edge blending.
GIF Optimization Checklist
Reduces file size while maintaining visual quality
Ensures optimal color representation for human perception
Prevents unwanted pixel scattering in solid color areas
Ensures smooth blending of transparent edges
Preserves transparent areas in the original image
PNG vs GIF Performance
GIF vs PNG-8 Feature Comparison
| Feature | GIF | PNG-8 |
|---|---|---|
| Compression Method | LZW compression | Deflate compression |
| Age/Support | Older format | Newer format |
| File Size | Larger (typically) | Smaller (5-25% reduction) |
| Text Graphics | Sometimes smaller | Usually larger |
| Color Palette | Up to 256 colors | Up to 256 colors |
Always test both GIF and PNG-8 with identical settings to determine which format yields the smaller file size for your specific graphic. PNG typically wins, but GIF can be smaller for certain text-based graphics.
Key Takeaways

, Photoshop offers an automated solution. Navigate to Image > Trim and configure the following settings:
from the toolbar on the left side of the Save for Web dialog.