Web Performance · Images
How to Optimize Images for Faster Website Loading
Published April 2026 · 8 min read
Images are the single largest contributor to page weight on most websites. According to HTTP Archive data, images account for over 50% of the average webpage's total byte size. This makes image optimization the highest-impact action you can take to speed up your website.
This guide covers the key techniques for optimizing images — from choosing the right format to resizing correctly and compressing efficiently — with practical steps you can take today without any paid tools.
Why Image Optimization Matters
Page speed directly affects your business in multiple measurable ways:
- SEO ranking: Google uses page speed as a direct ranking factor, particularly through its Core Web Vitals metrics. Slow-loading images hurt your Largest Contentful Paint (LCP) score, which is one of the three core metrics.
- User experience: Research consistently shows that users abandon pages that take more than 3 seconds to load. A 1-second delay in page response time reduces conversions by 7%.
- Mobile performance: Mobile users often have slower connections and less powerful processors. Images that are fine on desktop can make a mobile page unusable.
- Bandwidth costs: If you're paying for a CDN or hosting bandwidth, large unoptimized images translate directly to higher monthly bills.
Step 1: Resize Images to Their Display Size
The single biggest optimization most websites need is resizing images to the size at which they're actually displayed. It sounds obvious, but it's extremely common to upload a 4000 × 3000 pixel camera photo when the image will be displayed at 800 × 600 pixels on the page. The browser downloads the full 4000px image, then scales it down — wasting the extra data entirely.
Rule of thumb: Resize your image so its pixel dimensions match the largest size it will be displayed at on your page, multiplied by 2 for high-DPI (retina) screens. So if an image is displayed at 600px wide, resize it to 1200px wide before uploading.
You can resize images for free using our Image Resizer. All processing happens in your browser — no software needed.
Step 2: Choose the Right File Format
Choosing the correct format can reduce file size by 50% or more with no visible quality difference:
- JPG — Use for photographs. Lossy compression produces very small files with minimal visible degradation at quality settings of 80–90%. Never use PNG for photos on a website.
- PNG — Use for logos, icons, screenshots, and graphics with text or sharp edges. PNG is lossless, so these crisp-edged elements stay sharp. For photos, PNG produces files 3–10× larger than JPG with no visible benefit.
- WebP — Google's modern format supports both lossy and lossless compression and produces files 25–35% smaller than JPG or PNG at equivalent quality. Supported by all modern browsers. Use WebP where possible, with JPG/PNG fallbacks for compatibility if needed.
- SVG — For logos and icons that need to scale to any size without pixelation, SVG (Scalable Vector Graphics) is ideal. SVG files are tiny and resolution-independent.
Step 3: Compress Your Images
After resizing and choosing the right format, compression is the next optimization. The goal is to find the lowest quality setting that still looks good at the display size.
For JPG, a quality setting of 80–85% is usually imperceptible to the human eye for photographs on a screen, while reducing file size by 50–70% compared to 100% quality. Use the quality slider in our Image Resizer to control JPG compression.
For PNG, compression tools can remove metadata and apply more efficient lossless encoding to reduce file sizes by 20–40% without any quality change. Tools like PNGQuant or Squoosh work well for this.
Step 4: Use Responsive Images
A single image that looks great at 1400px wide is overkill on a 375px wide phone screen. Responsive images let the browser download the appropriately sized image for the current device, saving significant bandwidth on mobile.
In HTML, you can implement responsive images using the srcset attribute:
<img src="image-800.jpg" srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w" sizes="(max-width: 600px) 400px, (max-width: 900px) 800px, 1200px" alt="Description of the image" />
This tells the browser to use the 400px image on small screens, the 800px image on medium screens, and the 1200px image on large screens. The browser chooses automatically.
Step 5: Use Lazy Loading
By default, browsers load all images on a page — even those that are far below the visible area. Lazy loading delays the loading of off-screen images until the user scrolls near them. This significantly improves initial page load time.
Implementing lazy loading is simple in modern HTML:
<img src="image.jpg" loading="lazy" alt="Description" />
The loading="lazy" attribute is supported by all modern browsers and requires no JavaScript. Add it to any image that isn't visible in the initial viewport.
Step 6: Always Include Alt Text
Alt text isn't a performance optimization, but it matters for SEO and accessibility. Every image on your site should have descriptive alt text that explains what's in the image:
<!-- Bad --> <img src="photo.jpg" alt="" /> <!-- Good --> <img src="golden-retriever-puppy.jpg" alt="Golden retriever puppy playing in a green field" />
Alt text is read by screen readers for visually impaired users, and it's what search engines use to understand the content of your images. Descriptive alt text can improve your image search ranking.
How Image Optimization Affects Core Web Vitals
Google's Core Web Vitals measure three aspects of page experience. Images have a major impact on two of them:
- Largest Contentful Paint (LCP): This measures how quickly the largest content element on the page loads. In most cases, that element is a hero image or banner. A large, unoptimized hero image is the most common reason for a poor LCP score. Resizing and compressing your hero image is often the single most impactful thing you can do for your LCP score.
-
Cumulative Layout Shift (CLS): This measures visual stability — whether elements jump around as the page loads. Images without explicit width and height attributes cause layout shifts because the browser doesn't know how much space to reserve before the image loads. Always set
widthandheightattributes on your images.
Image Optimization Checklist
✓ Resize images to their display size (2× for retina)
✓ Use JPG for photographs, PNG for graphics/logos
✓ Consider WebP for better compression
✓ Compress JPGs to 80–85% quality
✓ Implement responsive images with srcset
✓ Add loading="lazy" to below-the-fold images
✓ Set explicit width and height attributes
✓ Add descriptive alt text to every image
✓ Use a CDN to serve images from a location near your users
Free Tools for Image Optimization
- QuickImageTools Image Resizer — Resize images to exact pixel dimensions for free, entirely in your browser.
- Google PageSpeed Insights — Analyzes your page and gives specific recommendations for image optimization, including which images to resize or compress.
- Squoosh (squoosh.app) — Google's browser-based image compression tool. Supports WebP, AVIF, and fine-grained quality control for all formats.
- TinyPNG / TinyJPG — Simple online compression tool with good quality/size balance. Free for up to 20 images per month.
Resize images to the right dimensions — free
The first step in image optimization. Works in your browser, no account needed.
Open Image Resizer