The Complete Image Optimization Checklist for 2026
Images account for 42% of total page weight on the average website (HTTP Archive 2025), and 72% of mobile pages have an image as the Largest Contentful Paint element. This is the definitive, 22-step image optimization checklist covering everything from format selection and compression to HTML implementation, CSS layout, CDN delivery, and ongoing monitoring. Bookmark this page and use it every time you add images to a website.
Table of Contents
According to the HTTP Archive's 2025 Web Almanac, images account for 42% of total page weight on the median web page. On image-heavy sites like e-commerce or photography portfolios, that number can reach 60-70%. Images are the single largest contributor to page size and the single highest-leverage optimization target.
The impact goes beyond page speed. Google's Core Web Vitals data shows that 72% of mobile pages have an image as the Largest Contentful Paint (LCP) element. Sites that pass CWV thresholds see 24% fewer user abandonments. And 28% of image bytes on the web are wasted simply by serving images at dimensions larger than their display size.
This checklist covers every step of the image optimization process, from the moment you create an image to the moment a browser renders it on screen. It is organized into five sections with 22 actionable steps. Use it as a reference every time you add images to a website. For a deep dive into any individual topic, follow the linked guides throughout.
Section 1: Before upload- preparing your images (8 steps)
The most impactful optimizations happen before an image ever touches your server. Every image you add to a website should go through these eight steps. Skipping even one can undo the gains from the rest.
Resize to display dimensions (not original resolution)
Never upload an image larger than its maximum display size. If an image displays at 800px wide on desktop, serving a 4000px original wastes bandwidth and processing time. 28% of image bytes on the web are wasted by oversized dimensions (HTTP Archive 2025). Account for 2x DPR for Retina displays: if the display size is 800px, serve a 1600px image. Going beyond 2x provides no visible benefit on any current display.
For responsive layouts, generate multiple sizes. Common breakpoints are 400px, 800px, 1200px, and 1600px. This ensures every device downloads only the pixels it needs. Use SammaPix Resize Pack to generate multiple sizes from a single source image.
Choose the right format (WebP for photos, PNG for graphics, SVG for icons)
Format selection has a dramatic impact on file size. WebP is 25-34% smaller than JPEG at equivalent quality with 97%+ browser support. AVIF is up to 50% smaller than JPEG but has slower decode times and 93% browser support. For a detailed comparison, read WebP vs AVIF vs JPEG: which format to use.
Use this decision tree:
- Photographs and complex images: WebP (lossy) as default. AVIF if you need maximum compression and your audience uses modern browsers.
- Screenshots, text, UI elements: PNG or WebP (lossless). These images have sharp edges that suffer under lossy compression.
- Logos and icons: SVG whenever possible. SVG is resolution-independent and typically a few KB.
- Animated content: WebP animated replaces GIF at 50-80% smaller file sizes.
Compress at quality 78-82 for web
For lossy formats (JPEG, lossy WebP), quality 78-82 is the sweet spot. Below 75, compression artifacts become noticeable. Above 85, file size increases significantly with minimal visual improvement. Quality 80 is the best general-purpose setting, providing 50-70% file size reduction with imperceptible quality loss on screen-sized displays. For a complete guide, read how to compress images without losing quality.
Compress images with precision
SammaPix Compress lets you set exact quality levels and see the file size reduction in real time. Browser-based, no upload, no signup.
Open Compress toolConvert to WebP or AVIF for modern browsers
If your images are still in JPEG or PNG, converting to WebP is the single easiest win. WebP delivers 25-34% smaller files with no visible quality loss and supports transparency. AVIF pushes savings even further at up to 50% smaller than JPEG, but encode/decode is slower and browser support is at 93%. Use the picture element to serve AVIF with WebP and JPEG fallbacks. For details, read the best image format for web in 2026.
Convert images to WebP
Batch convert JPG, PNG, and other formats to WebP with SammaPix. Reduce file sizes by 25-34% with no visible quality loss.
Open WebP ConverterStrip EXIF metadata for privacy and file size
Every photo from a smartphone or camera contains EXIF metadata: GPS coordinates, device model, camera settings, timestamps, and sometimes even the owner's name. This data typically adds 10-50KB per image and creates serious privacy risks. A photo posted online with GPS data reveals the exact location where it was taken. Strip all EXIF data before uploading images to any public-facing website. For a complete guide, read how to remove EXIF data to protect privacy.
Remove EXIF data from photos
SammaPix EXIF Remover strips all metadata including GPS coordinates. Runs entirely in your browser for maximum privacy.
Open EXIF RemoverGenerate descriptive filenames (not IMG_4521.jpg)
Search engines use filenames as a signal for image content. A file named golden-retriever-playing-fetch.webp tells Google far more than IMG_4521.jpg. Use descriptive, lowercase, hyphen-separated filenames that include relevant keywords naturally. For large batches, AI-powered renaming tools can analyze image content and generate SEO-friendly names automatically. Read the AI image renaming guide for SEO for the full workflow.
Rename images with AI
SammaPix AI Rename analyzes your images and generates descriptive, SEO-friendly filenames automatically.
Open AI RenameWrite meaningful alt text for every image
Alt text serves three purposes: accessibility (screen readers), SEO (search engines use it to understand image content), and fallback display when images fail to load. Every informational image should have descriptive alt text under 125 characters. Decorative images should have an empty alt attribute (alt=""). Good alt text describes the content, not the image itself. "Golden retriever catching a frisbee in a park" is better than "dog photo."
Generate alt text with AI
SammaPix AI Alt Text analyzes your images and generates descriptive, SEO-friendly alt text automatically.
Open AI Alt TextCreate multiple sizes for responsive srcset
A single image size cannot serve every device optimally. A 1600px hero image is overkill for a 375px mobile screen. Generate multiple sizes- typically 400w, 800w, 1200w, and 1600w- so the browser can select the best match via srcset. This can reduce image downloads by 40-60% on mobile devices compared to serving a single large image.
Generate responsive image sizes
SammaPix Resize Pack generates multiple sizes from a single image for srcset. All processing runs in your browser.
Section 2: HTML implementation- the code that serves your images (5 steps)
Optimized source files are only half the story. The HTML that delivers those images to the browser determines whether the user gets the right size, at the right time, in the right format. These five steps ensure your code matches your files.
Add width and height attributes on every img element
Always include width and height attributes on img elements. This prevents Cumulative Layout Shift (CLS) by allowing the browser to reserve the correct space before the image loads. Without these attributes, the page layout jumps when each image finishes loading, creating a jarring experience. Combine with CSS max-width: 100%; height: auto; for responsive behavior while maintaining the aspect ratio reservation. See web.dev's CLS optimization guide for details.
Use srcset and sizes for responsive images
The srcset attribute tells the browser which image sizes are available, and the sizes attribute tells it how large the image will display at each viewport width. Together, they allow the browser to select the optimal image for the user's device, downloading only the pixels needed. A common pattern: generate images at 400w, 800w, 1200w, and 1600w. The browser selects the best match based on viewport width and device pixel ratio.
Use the picture element for format switching
The HTML picture element allows you to serve modern formats (AVIF, WebP) with automatic fallback to JPEG for older browsers. The browser evaluates source elements in order and uses the first format it supports. List AVIF first (smallest), then WebP, then JPEG as the final fallback. This ensures every user gets the best format their browser can handle without any JavaScript.
Add loading="lazy" to below-fold images
Native lazy loading defers loading until the image is near the viewport, saving bandwidth and improving initial load time. Add loading="lazy" to all images below the fold. Critical rule: never lazy load the LCP image (usually the hero image above the fold). Lazy loading the LCP image is one of the most common performance mistakes and directly harms your Core Web Vitals score.
Add fetchpriority="high" to the LCP image
The fetchpriority attribute tells the browser to prioritize downloading the LCP image over other resources. Since 72% of mobile pages have an image as their LCP element, adding fetchpriority="high" to that image directly improves LCP time. Combine this with loading="eager" (or simply omit the loading attribute, which defaults to eager). For a complete guide to optimizing LCP, read how to optimize images for Core Web Vitals.
Section 3: CSS and layout (3 steps)
CSS controls how images are displayed and when the browser allocates resources for them. These three CSS techniques prevent layout shifts, improve perceived performance, and reduce rendering overhead.
Set max-width: 100% and height: auto on all images
This is the foundation of responsive images in CSS. Without max-width: 100%, images overflow their containers on small screens. Without height: auto, the image distorts when the width is constrained. Together with the HTML width and height attributes from step 9, this preserves the aspect ratio while allowing the image to scale down responsively.
Use aspect-ratio or padding-bottom hack for placeholders
While the image loads, the browser needs to reserve the correct amount of space. The modern approach is the CSS aspect-ratio property (e.g., aspect-ratio: 16 / 9), which is supported in all modern browsers. The legacy approach uses the padding-bottom percentage hack (e.g., padding-bottom: 56.25% for 16:9). Both approaches eliminate CLS by reserving the exact space before the image arrives. Combine with a low-contrast background color or a blurred placeholder for a polished loading experience.
Use content-visibility: auto for off-screen images
The content-visibility: auto CSS property tells the browser to skip rendering elements that are far off-screen. When applied to image containers, the browser defers layout and paint work until the container is near the viewport. This reduces the initial rendering workload, especially on long pages with many images. Pair it with contain-intrinsic-size to provide a size estimate and prevent layout shifts when the element enters the viewport.
Full image optimization workflow- all in your browser
Resize, convert to WebP, compress, strip EXIF, rename for SEO, and generate alt text. All free, all private, no signup.
Section 4: Server and CDN delivery (3 steps)
Even perfectly optimized images need to be delivered efficiently. Server configuration and CDN setup determine how fast images reach the user and whether they get cached effectively for repeat visits.
Set Cache-Control headers (max-age=31536000 for hashed filenames)
Images rarely change after upload. Set aggressive cache headers: Cache-Control: public, max-age=31536000, immutable for versioned image URLs (URLs that include a hash or version number). This tells browsers and CDN edge servers to cache the image for one year without revalidation, eliminating repeat downloads entirely. If your image URLs are not versioned, use shorter max-age values with ETag-based revalidation.
Enable content negotiation (Accept header) for automatic format serving
Configure your server or CDN to serve different image formats based on the browser's Accept header. When a browser sends Accept: image/avif, serve AVIF. When it sends Accept: image/webp, serve WebP. Fall back to JPEG otherwise. Cloudflare, AWS CloudFront, and most modern CDNs support this natively through image transformation features. This approach serves optimal formats without requiring the picture element on every image.
Use a CDN for global delivery
A Content Delivery Network serves images from edge servers geographically close to the user, dramatically reducing latency. For a user in Tokyo accessing a server in New York, a CDN can reduce image load time by 200-400ms. This directly improves LCP. Most CDNs also provide automatic image optimization (resize, format conversion, compression) at the edge. Cloudflare, Fastly, and AWS CloudFront all offer image transformation features that can handle format conversion and resizing automatically based on the request.
Section 5: Monitoring and maintenance (3 steps)
Image optimization is not a one-time task. New content is added, designs change, and standards evolve. These three steps keep your images optimized over time. Sites that pass Core Web Vitals thresholds see 24% fewer user abandonments according to Google.
Run PageSpeed Insights on key pages monthly
Google PageSpeed Insights provides both lab data (Lighthouse) and field data (CrUX) for your pages. Check your key pages monthly at minimum. Pay attention to the image-specific opportunities: "Serve images in next-gen formats," "Properly size images," "Efficiently encode images," and "Defer offscreen images." Each of these directly corresponds to a step in this checklist.
Check Core Web Vitals report in Search Console
Google Search Console provides a Core Web Vitals report showing real-world performance data from Chrome users. Monitor the LCP trend over time. If LCP degrades after a content update, it is almost always because new images were added without optimization. Set up a process to review CWV data weekly and create alerts if LCP exceeds 2.5 seconds on any page group.
Audit new images before publishing (don't let your team upload unoptimized images)
For sites with content teams, unoptimized images uploaded by non-technical team members are the most common source of performance regression. Establish a pre-upload workflow: every image goes through resize, compress, format conversion, and alt text before it touches the CMS. For developer teams, integrate image optimization into your CI/CD pipeline using tools like sharp (Node.js), next/image (Next.js), or automated build-time optimization. For content teams without technical access, use browser-based tools like SammaPix Compress to ensure every image is optimized before it reaches the CMS. Read how to batch compress images with no signup for the full workflow.
Optimize images before every publish
Use SammaPix as your pre-upload workflow. Compress, convert, resize, strip metadata- all in your browser, all free.
The complete checklist (quick reference)
Here is every step in a single reference table. Bookmark this section for quick access during your image workflow.
| # | Step | Tool / Resource |
|---|---|---|
| Before Upload | ||
| 1 | Resize to display dimensions (2x for Retina) | Resize Pack |
| 2 | Choose the right format (WebP / PNG / SVG) | Format guide |
| 3 | Compress at quality 78-82 | Compress |
| 4 | Convert to WebP or AVIF | WebP Converter |
| 5 | Strip EXIF metadata | EXIF Remover |
| 6 | Use descriptive filenames | AI Rename |
| 7 | Write meaningful alt text | AI Alt Text |
| 8 | Generate multiple sizes for srcset | Resize Pack |
| HTML Implementation | ||
| 9 | Add width and height on every img | web.dev CLS guide |
| 10 | Use srcset and sizes | MDN srcset |
| 11 | Use picture for format switching | MDN picture |
| 12 | Add loading="lazy" to below-fold images | MDN loading |
| 13 | Add fetchpriority="high" to LCP image | web.dev fetchpriority |
| CSS and Layout | ||
| 14 | Set max-width: 100% and height: auto | CSS baseline |
| 15 | Use aspect-ratio for placeholders | CSS aspect-ratio |
| 16 | Use content-visibility: auto for off-screen | CSS content-visibility |
| Server and CDN | ||
| 17 | Set Cache-Control: max-age=31536000 | Server config |
| 18 | Enable Accept-header content negotiation | CDN config |
| 19 | Use a CDN for global delivery | Cloudflare / CloudFront / Fastly |
| Monitoring and Maintenance | ||
| 20 | Run PageSpeed Insights monthly | PageSpeed Insights |
| 21 | Check Core Web Vitals in Search Console | Search Console |
| 22 | Audit new images before publishing | SammaPix |
Key statistics to remember
- 42% of total page weight comes from images (HTTP Archive 2025)
- 72% of mobile pages have an image as the LCP element
- Sites passing CWV see 24% fewer abandonments
- 28% of image bytes are wasted by oversized dimensions
- WebP is 25-34% smaller than JPEG at equivalent quality
- AVIF is up to 50% smaller than JPEG
Related guides
- How to compress images without losing quality
- WebP vs AVIF vs JPEG: the definitive comparison
- How to optimize images for Core Web Vitals in 2026
- Remove EXIF data to protect your privacy
- AI image renaming for SEO: the complete guide
- Batch compress images free- no signup, no upload
- The best image format for web in 2026
FAQ
What percentage of page weight comes from images?
According to HTTP Archive data from 2025, images account for approximately 42% of total page weight on the median web page. On image-heavy sites like e-commerce or photography portfolios, this percentage can be 60-70%. This makes images the single largest contributor to page size and the highest-leverage optimization target.
What is the best image format for the web in 2026?
WebP is the best default format for web images in 2026. It offers 25-34% smaller file sizes than JPEG at equivalent quality, supports both lossy and lossless compression, handles transparency, and has 97%+ browser support. AVIF offers even smaller files (up to 50% smaller than JPEG) but has slower decode times and 93% browser support. Use WebP as your default and consider AVIF for bandwidth-critical applications.
Should I strip EXIF data from images before uploading?
Yes, for two reasons. First, EXIF data can contain sensitive information including GPS coordinates, device serial numbers, and timestamps that reveal when and where photos were taken. Second, EXIF data adds unnecessary bytes to the file. A typical smartphone photo carries 10-50KB of EXIF metadata. Stripping it reduces file size and protects user privacy.
What quality level should I use when compressing images for the web?
For lossy formats like JPEG and WebP, quality 78-82 is the sweet spot for web use. Below 75, compression artifacts become noticeable on most images. Above 85, file size increases significantly with minimal visible improvement. Quality 80 is the best general-purpose setting, delivering 50-70% file size reduction with imperceptible quality loss on screen-sized displays.
How do I write good alt text for images?
Good alt text describes the content and function of the image concisely. Keep it under 125 characters. Describe what the image shows, not what it is (say 'Golden retriever catching a frisbee in a park' not 'dog photo'). Include relevant keywords naturally but avoid keyword stuffing. For decorative images that add no informational content, use an empty alt attribute (alt='').
How often should I audit my website's images?
Run a full image audit quarterly using Google PageSpeed Insights and Lighthouse. After any major content update or redesign, run an immediate audit. Monitor Core Web Vitals in Google Search Console continuously, paying attention to LCP trends. Set up alerts if LCP exceeds 2.5 seconds. For large sites with frequent content updates, consider automated image optimization in your CI/CD pipeline.