Optimizing & Exporting HTML
Master HTML Email Export and Image Optimization
Core Image Format Options
JPEG Format
Best for photos and graphics with thousands of colors. Offers variable quality settings from 0-100 with corresponding file size trade-offs.
PNG-8 Format
Ideal for graphics with limited colors. Supports up to 256 colors with excellent compression for text and simple graphics.
GIF Format
Traditional format similar to PNG-8 but typically produces larger file sizes. Best tested against PNG-8 for comparison.
Preparation Workflow
Open Working File
Access yourname-Lunch Menu.psd from previous exercise or open Lunch Menu-optimize.psd as starting point
Save Working Copy
Use File > Save As to create yourname-Lunch Menu-optimize.psd for this optimization exercise
Launch Export Dialog
Navigate to File > Export > Save for Web (Legacy) and select Optimized tab for real-time preview
JPEG Quality vs File Size Impact
Quality settings between 60-70 provide the best balance of visual quality and file size for most photographic content in HTML emails.
PNG-8 Color Optimization Process
Start with 16 Colors
Begin with minimal colors to see baseline quality and identify insufficient color depth
Test 128 Colors
Increase to 128 and check for color banding or abrupt shade changes in gradients
Optimize at 256 Colors
Maximum PNG-8 colors typically provide clean results for complex graphics
Apply Perceptual Palette
Choose Perceptual color selection for best file size with minimal visual difference
PNG-8 vs GIF Performance
| Feature | PNG-8 | GIF |
|---|---|---|
| Compression Technology | Modern algorithm | Legacy algorithm |
| File Size | 5-25% smaller | Typically larger |
| Color Support | Up to 256 colors | Up to 256 colors |
| Text Graphics | Usually better | Sometimes smaller |
| Browser Support | Universal modern | Universal legacy |
Always compare file sizes between GIF and PNG-8 with identical settings, as performance can vary depending on the specific graphic content and color complexity.
HTML Export Configuration
Set Export Format
Choose 'HTML and Images' format to generate both the HTML structure and optimized image files
Configure Slice Selection
Ensure 'All Slices' is selected to export every optimized slice with proper naming and organization
Define File Structure
Save to organized folder structure with descriptive filename like lunch-menu.html for easy identification
Post-Export HTML Modifications
Replace relative paths for proper email client compatibility
Add CSS or HTML attributes for proper email alignment
Define fallback background for consistent email appearance
Ensure accessible and branded alternative text display
Photoshop-generated HTML files are not flexible for ongoing edits. Design changes typically require returning to Photoshop and re-exporting the entire email structure.
Key Takeaways

from the left panel.