Image Optimization: The Biggest Quick Win for Site Speed

Sam Hemburyยท30 December 2024ยท14 min readยทBeginner

Learn how to optimize images for your website without losing quality. A practical guide to image formats, compression, and free tools anyone can use.

Key Takeaways

  • 1Unoptimized images are responsible for 50-80% of most websites' total page weight
  • 2WebP format can reduce image file sizes by 25-35% compared to JPEG with the same quality
  • 3Resizing images to their display dimensions often produces the biggest file size reduction
  • 4Free tools like Squoosh and TinyPNG can compress images by 60-80% with no visible quality loss
  • 5Lazy loading delays off-screen images until needed, dramatically improving initial load times

If your website is slow, images are almost certainly the main culprit. They're not just a contributor to the problem - they're usually the problem. The good news? Fixing them is straightforward, doesn't require technical skills, and often produces dramatic improvements.

๐Ÿ‹๏ธ
Images are half your page weight
On most websites, images account for 50โ€“80% of total page size. Fixing them is the single biggest speed win you can get โ€” and it's free.
Unoptimised hero: 8+ seconds on 4G Optimised hero: under 1 second Same image, no visible difference

Why Images Are Such a Big Deal

According to HTTP Archive data, images account for roughly 50% of the average webpage's total weight. On image-heavy sites like portfolios or e-commerce stores, that figure can reach 80% or more.

Here's a real scenario that plays out constantly:

A business owner takes a beautiful photo with their smartphone. Modern phones capture images at 12-48 megapixels - resulting in files that are 4-10MB each. They upload this directly to their website as a hero image.

That single image now takes 4-8 seconds to load on a typical mobile connection. The visitor has left before seeing anything else on the page.

The same image, properly optimized, could be 200KB - loading in well under a second with no visible difference in quality.

This isn't a marginal improvement. It's transformative.

๐Ÿ“
Each step slashes file size dramatically
Resizing and format changes compound โ€” the same photo can go from unusable to instant.
Original camera photo: 8MB (10+ seconds on 4G)
Resized to display dimensions: 2MB
Compressed as JPEG at 80%: 400KB
Converted to WebP: 200KB (under 1 second)

Understanding Image Formats

Before diving into optimization techniques, let's understand what we're working with. Different formats serve different purposes.

JPEG (or JPG)

Best for: Photographs and images with many colours and gradual tonal variations.

JPEG has been the web standard for photos since the 1990s. It uses "lossy" compression, meaning it permanently removes data to reduce file size. At reasonable quality settings (75-85%), this removal is imperceptible to human eyes.

Strengths: Universal browser support, good compression for photos, adjustable quality levels.

Weaknesses: No transparency support, quality degrades with repeated editing/saving, not ideal for graphics or text.

PNG

Best for: Graphics, logos, screenshots, images requiring transparency.

PNG uses "lossless" compression - no data is permanently discarded. This makes it excellent for graphics with text, logos, and anything requiring crisp edges or transparent backgrounds.

Strengths: Supports transparency, lossless quality, perfect for graphics.

Weaknesses: Much larger file sizes than JPEG for photographs, often misused for photos where JPEG would be better.

WebP

Best for: Almost everything. The modern replacement for both JPEG and PNG.

WebP was developed by Google and offers significantly better compression than JPEG while maintaining similar quality. It supports both lossy and lossless compression, plus transparency.

Strengths: 25-35% smaller files than JPEG at equivalent quality, supports transparency, supported by all modern browsers.

Weaknesses: Very old browsers don't support it (IE11, very old Safari), though this affects less than 2% of users now.

AVIF

Best for: Maximum compression when browser support isn't critical.

AVIF is the newest format, offering even better compression than WebP - typically 30-50% smaller files. However, browser support is still catching up.

Strengths: Best compression available, excellent quality.

Weaknesses: Not yet universally supported, slower to encode, not worth the compatibility headaches for most sites.

๐Ÿ—‚๏ธ
WebP wins for almost everything โ€” stop using PNG for photos
Most business sites only need two formats. WebP handles photos, graphics, and transparency at 25-35% smaller than JPEG. PNG is for edge cases where you need lossless quality. AVIF is even smaller but browser support is still catching up.
WebP: Best all-rounder โ€” photos, graphics, transparency. 25-35% smaller than JPEG
JPEG: Universal fallback for photos. No transparency support
PNG: Lossless quality, transparency. Large files โ€” avoid for photos
AVIF: Smallest files of all but limited browser support. The future, not yet the default

Choosing the Right Format

Here's a simple decision tree:

Is it a photograph or realistic image?

  • Yes: Use WebP (with JPEG fallback if you're concerned about old browsers)
  • No: Continue below

Does it need a transparent background?

  • Yes: Use WebP or PNG
  • No: Continue below

Is it a simple graphic with few colours (under 256)?

  • Yes: Consider PNG-8 or SVG
  • No: Use WebP or PNG

In practice: For most business websites, you'll use WebP for everything (photos, graphics, backgrounds) and PNG only when you specifically need transparency and are worried about the 2% of users on outdated browsers.

Compression: Lossy vs Lossless

Understanding compression types helps you make better decisions.

Lossy Compression

Permanently removes image data that humans typically can't perceive. Think of it like MP3 audio - the compression discards frequencies most people can't hear.

Results: Dramatic file size reductions (often 60-80%), with quality loss only visible at aggressive settings.

Use for: Photographs, hero images, backgrounds, product photos.

Lossless Compression

Reduces file size without discarding any data. The original can be perfectly reconstructed.

Results: Modest file size reductions (typically 10-30%), with zero quality loss.

Use for: Logos, graphics with text, images that will be edited further, anything where every pixel matters.

The Sweet Spot

For most website images, lossy compression at 75-85% quality provides:

  • Significant file size reduction
  • No visible quality difference to normal viewers
  • Fast loading times

This is the setting you should use for hero images, background images, product photos, and team photos.

๐ŸŽฏ
80% quality is the sweet spot
Dropping from 100% to 80% quality cuts file size by 70% with no visible difference. Go below 60% and you'll start seeing blurry artifacts.
100% quality โ†’ 400KB 80% quality โ†’ 120KB (looks identical) 50% quality โ†’ 60KB (visible degradation)

The Dimension Problem

File size isn't just about compression - the actual pixel dimensions matter enormously.

Here's math that explains why:

  • A 4000 x 3000 pixel image contains 12 million pixels
  • A 1200 x 900 pixel image contains 1.08 million pixels

That's 11 times more data in the larger image - before any compression is applied.

What Dimensions Should You Use?

The rule is simple: export images at the size they'll display, doubled for retina screens.

Display Size Export At
600px wide 1200px wide
400px wide 800px wide
Full-width hero (1200px max) 2400px wide

Your phone's 48-megapixel photos are spectacularly oversized for web use. A 4000px image displaying at 600px isn't sharper - it's just slower.

Common Scenarios

Hero/banner images: 2400px wide maximum. Even on a 27-inch monitor, this provides crisp display with good file sizes.

Blog post images: 1600px wide maximum. Most content areas are 600-800px, so 1600px gives crisp retina display.

Thumbnails and cards: 600-800px wide. These display at 300-400px typically.

Background images: 1920px wide for full-bleed backgrounds. Consider whether full quality is needed (subtle patterns can be more compressed).

Free Tools for Image Optimization

You don't need expensive software. These free tools handle everything.

Squoosh (squoosh.app)

Best for: Manual optimization with full control.

Google's free web app lets you compare original and compressed versions side-by-side, adjust quality in real-time, and export to any format.

How to use it:

  1. Go to squoosh.app
  2. Drag your image onto the page
  3. Select WebP or JPEG output
  4. Adjust quality slider until file size is acceptable
  5. Enable "Resize" and set your target dimensions
  6. Download the optimized image

Pro tip: The side-by-side comparison is invaluable. Drag the slider to spot any quality differences before committing.

TinyPNG (tinypng.com)

Best for: Quick batch compression without decisions.

Despite the name, TinyPNG handles both PNG and JPEG files. It applies intelligent compression automatically, typically achieving 60-80% reduction.

How to use it:

  1. Go to tinypng.com
  2. Drag up to 20 images onto the page
  3. Wait for compression
  4. Download all

Limitation: No dimension resizing. Use your image editor to resize first, then TinyPNG to compress.

ImageOptim (Mac only)

Best for: Desktop workflow, especially for multiple images.

A Mac application that compresses images by dragging them onto the app. It's lossless by default but can be configured for lossy compression.

Online converters for WebP

If your image editor doesn't export WebP, sites like CloudConvert or FreeConvert handle format conversion. Though Squoosh is usually easier.

๐Ÿ› ๏ธ
30 seconds in Squoosh beats any WordPress plugin
Google's free Squoosh.app lets you resize, convert to WebP, and compress โ€” all in your browser. Drag an image in, set quality to 80%, resize to your display dimensions, and download. More control than any automated plugin, and it works with any website platform.

Lazy Loading: Load Images Only When Needed

Here's a powerful technique that costs nothing and requires minimal effort.

The concept: Instead of loading all images when the page first loads, lazy loading waits until an image is about to scroll into view. A page with 20 images might only load 3-4 initially, loading the rest as needed.

The impact: If your page has ten images below the fold (not visible without scrolling), lazy loading removes them from initial page load entirely. This can reduce initial load time by 50% or more on image-heavy pages.

How to Implement Lazy Loading

Modern HTML (works everywhere):

Add loading="lazy" to your image tags:

<img src="photo.webp" loading="lazy" alt="Description">

That's it. Modern browsers handle the rest automatically.

WordPress: Most caching plugins include lazy loading. WP Rocket, Perfmatters, and Jetpack all offer this. WordPress itself now adds loading="lazy" to images by default.

Website builders: Squarespace, Wix, and Shopify all include lazy loading automatically on modern themes.

What Not to Lazy Load

Don't lazy load your hero image or anything "above the fold" (visible without scrolling). These should load immediately for good Largest Contentful Paint scores. Only lazy load images that require scrolling to see.

WordPress Image Optimization Plugins

If you're on WordPress, plugins can automate much of this work.

ShortPixel

What it does: Automatically compresses images on upload, converts to WebP, generates multiple sizes.

Cost: Free for 100 images/month, then ~ยฃ4/month for unlimited.

Verdict: Excellent choice. Good compression, easy setup, includes WebP conversion.

Imagify

What it does: Similar to ShortPixel - automatic compression and WebP conversion.

Cost: Free for 20MB/month, then from ~ยฃ5/month.

Verdict: Slightly more aggressive compression by default. Same makers as WP Rocket, so they work well together.

Smush

What it does: Compression and lazy loading in one plugin.

Cost: Free version available (limited), Pro from ~ยฃ5/month.

Verdict: The free version lacks WebP conversion, which limits its usefulness. Pro version is capable.

EWWW Image Optimizer

What it does: Server-side optimization without sending images to external services.

Cost: Free for basic compression, premium features from ยฃ6/month.

Verdict: Good for privacy-conscious users. Does the work on your own server.

My Recommendation

For most WordPress sites: ShortPixel or Imagify on the paid tier. The automatic WebP conversion alone is worth it. Set it up once and forget about it - every image you upload gets optimized automatically.

Important: Even with plugins, it's better to resize images before uploading. A plugin can compress a 4000px image, but it's still processing and storing unnecessarily large files.

๐Ÿ”Œ
ShortPixel or Imagify โ€” set it and forget it
For WordPress, an image optimisation plugin handles new uploads automatically. Here's how the main options compare.
ShortPixel โ€” free for 100 imgs/month, WebP included, ~ยฃ4/month unlimited
Imagify โ€” free for 20MB/month, WebP included, ~ยฃ5/month unlimited
Smush โ€” free version lacks WebP, Pro ~ยฃ5/month
EWWW โ€” processes on your server (good for privacy), ~ยฃ6/month

Before and After: Real Examples

Let's look at what proper optimization achieves.

Example 1: Hero Image

Before:

  • Original camera photo: 4032 x 3024 pixels
  • Format: JPEG (uncompressed from camera)
  • File size: 6.2MB
  • Load time on 4G: 8+ seconds

After:

  • Resized to 2400 x 1350 pixels
  • Converted to WebP at 80% quality
  • File size: 186KB
  • Load time on 4G: Under 1 second

Reduction: 97% - with no visible quality difference at display size.

Example 2: Product Photos (set of 12)

Before:

  • Original size: 12 x 3MB = 36MB total
  • Initial page load: 15+ seconds

After:

  • Resized to 800px, WebP at 80%
  • 12 x 45KB = 540KB total
  • Plus lazy loading for off-screen images
  • Initial page load: Under 2 seconds

Reduction: 98% - page now loads instantly.

Example 3: Team Page (8 portrait photos)

Before:

  • PNG format (wrong choice for photos)
  • 1200 x 1600 pixels each
  • Average 2.4MB per image = 19.2MB total

After:

  • JPEG at 85% quality, resized to 600 x 800
  • Average 65KB per image = 520KB total
  • Lazy loading enabled

Reduction: 97%

๐Ÿš€
Image optimisation alone can double your speed score
These are real-world results from optimising images on an otherwise unchanged website. Nothing else was touched.
Before: score 34, LCP 8.2s After: score 89, LCP 1.8s Hero image: 6.2MB โ†’ 186KB (97% reduction)

What You Can Do This Week

Here's your action plan - tackle one task per day if you're short on time.

Day 1: Audit Your Current Images

  1. Run your homepage through PageSpeed Insights (pagespeed.web.dev)
  2. Look for "Properly size images" or "Serve images in next-gen formats" opportunities
  3. Note which images are flagged as oversized

Day 2: Fix Your Hero Image

Your hero image impacts every visitor and contributes significantly to your Largest Contentful Paint score.

  1. Find your current hero image file
  2. Open Squoosh.app
  3. Resize to 2400px wide maximum
  4. Convert to WebP at 80% quality
  5. Upload and replace the old image

Day 3: Optimize Your Largest Problem Images

Address whatever PageSpeed flagged:

  1. Take the top 3-5 largest images identified
  2. Process each through Squoosh
  3. Replace them on your site

Day 4: Enable Lazy Loading

WordPress: Install a caching plugin like WP Rocket or Perfmatters that includes lazy loading, or check if your theme has the option.

Other platforms: Check your platform's documentation - most modern platforms include this.

Manual: Add loading="lazy" to image tags below the fold.

Day 5: Set Up Ongoing Optimization

WordPress: Install ShortPixel or Imagify. Configure it to auto-optimize uploads.

Other platforms: Create a personal checklist for image preparation before uploading.

Day 6: Re-test

Run PageSpeed Insights again. Compare your new scores to Day 1. You should see significant improvement in:

  • Overall Performance score
  • Largest Contentful Paint (LCP)
  • Total page weight

Common Mistakes to Avoid

Uploading images straight from your camera. Always resize and compress first.

Using PNG for photographs. PNG is for graphics; JPEG or WebP for photos.

Ignoring mobile. Most visitors are on phones. Test on real mobile devices.

Over-compressing. Quality below 60% usually shows visible artifacts. Stay at 75-85%.

Forgetting alt text. While optimizing, ensure every image has descriptive alt text for accessibility and SEO.

Lazy loading hero images. Your main above-the-fold images should load immediately.

The Bottom Line

Image optimization is genuinely the lowest-hanging fruit for website speed. It's:

  • Free - using tools like Squoosh costs nothing
  • Easy - no coding required
  • Impactful - often produces the single biggest speed improvement
  • Permanent - once done, the benefits persist

A few hours of work can transform a sluggish, frustrating website into something that loads almost instantly. For the return on investment, nothing else comes close.

Your visitors won't consciously notice that images load quickly. But they'll absolutely notice when they don't. Fast-loading images create the foundation for everything else on your site to work effectively.

Start with your hero image today. The difference will be immediate.

Frequently Asked Questions

Will compressing images make them look blurry?
Not if done correctly. Modern compression tools are remarkably clever at removing data humans can't perceive. An image compressed by 70% often looks identical to the original. The key is using the right quality settings - typically 75-85% for JPEG gives excellent results with significant size reduction.
What's the best image format to use?
For photos: WebP is the best modern choice, with JPEG as a fallback. For graphics, logos, or images needing transparency: PNG or WebP. For simple graphics with few colours: SVG. Avoid using PNG for photographs - the files are unnecessarily large.
How big should my images be in pixels?
Match your display size, accounting for retina screens. If an image displays at 600 pixels wide, export it at 1200 pixels (2x) for sharp display on high-resolution screens. Your 4000-pixel camera photos are massively oversized for web use.
Should I use a WordPress plugin or compress manually?
Both have merit. Plugins like ShortPixel or Imagify automatically handle new uploads - great for ongoing optimization. Manual compression using Squoosh gives you more control and works for any website. Ideally, compress before uploading AND use a plugin as a safety net.

Sources & References

Tagged with:

PerformanceImage OptimizationWebsite SpeedQuick Wins
Share this article

Need Help Implementing This?

Pink Frog Studio builds fast, secure websites that actually get found. Let's chat about your project.