Free templates. Instant download, no account required.
Speed & SEO

How to optimize images in WordPress

How to Optimize Images in WordPress (2026 Guide)

Large images are a common reason WordPress pages become heavier than they need to be. The biggest improvements usually come from fixing three things: image dimensions, file size, and format.

You do not need to install an image plugin immediately. Start by checking whether images are actually causing a performance problem, then choose the simplest fix.

1. Check whether images are slowing the page down

Before changing your entire media library, test an important page with PageSpeed Insights.

Look for image-related recommendations such as oversized images, inefficient encoding, or a large image affecting Largest Contentful Paint.

If the report points mainly to JavaScript, server response time, fonts, or another issue, optimizing every image on the site may not be your highest priority.

I prefer fixing the bottleneck I can actually see rather than optimizing something just because it appears on a generic speed checklist.

2. Resize oversized images before uploading

A common mistake is uploading a photo straight from a phone or camera even though the website displays it at a much smaller size.

If an image will never appear anywhere close to its original dimensions, resize it first.

You can use:

  • Squoosh
  • TinyPNG
  • Preview on macOS
  • A desktop image editor

Do not obsess over one universal width such as 1200 pixels. The right dimensions depend on your theme, content layout, responsive breakpoints, and where the image appears.

The goal is simply to avoid sending visitors substantially more pixels than the design needs.

WordPress also creates multiple image sizes and can serve responsive versions, but starting with a reasonably sized original still makes the media library easier to manage.

3. Compress images without chasing the smallest possible file

Compression reduces file size while trying to preserve acceptable image quality.

There are two broad approaches:

Lossless compression removes unnecessary data without intentionally reducing image quality.

Lossy compression can produce smaller files by discarding some image information.

For ordinary blog photos, I usually use moderate lossy compression and check the result visually. There is no reason to make a photograph noticeably worse just to save a few extra kilobytes.

Tools such as Squoosh and TinyPNG let you compare the result before uploading.

For screenshots, graphics, or images containing small text, inspect the output more carefully. Aggressive compression that looks fine on a photograph may make interface text or sharp edges look poor.

4. Use WebP or AVIF when they actually improve the image

WebP and AVIF can produce smaller files than older formats such as JPEG and PNG in many situations.

That does not mean every image on a WordPress site needs to be converted automatically.

For photographs and other raster images, compare the modern format with the original and keep the version that gives you a good balance of file size and visual quality.

Different image types may need different formats:

  • Photos: JPEG, WebP, or AVIF
  • Graphics with transparency: PNG, WebP, or AVIF depending on the result
  • Logos and simple illustrations: SVG may be a better fit when appropriate

I would not convert a file just because WebP or AVIF sounds newer. The smaller useful file is what matters.

5. Let WordPress handle lazy loading before adding another system

Modern WordPress already includes native image lazy loading and other image-loading optimizations.

That means you usually do not need to install a plugin just to add loading="lazy" to images.

Lazy loading is useful for images farther down a page because the browser does not need to fetch all of them immediately.

The important exception is an image needed near the top of the page.

Do not deliberately lazy-load your hero image or another likely Largest Contentful Paint image. Delaying an important above-the-fold image can make LCP worse instead of better.

If a theme, caching plugin, or image plugin adds its own lazy-loading system, check what WordPress is already doing before enabling another one.

6. Use an image optimization plugin if you want automation

A plugin makes sense when you upload images frequently and want WordPress to handle compression or format conversion automatically.

You only need one image optimization system.

Smush

Smush is easy to use for automatic compression, bulk optimization, and additional image performance controls.

Its free and paid feature sets differ, particularly around some WebP and AVIF functionality and file-size limits, so check the current plan before choosing it specifically for next-generation image conversion.

Best for: beginners who mainly want an easy interface and automatic optimization.

ShortPixel

ShortPixel supports compression and modern image formats including WebP and AVIF.

Its free plan currently provides a limited number of optimization credits each month. Remember that WordPress can create several thumbnail sizes from one uploaded image, and those generated files can also use credits.

Best for: smaller sites that want strong compression and do not upload large numbers of images every month.

EWWW Image Optimizer

EWWW can perform unlimited local image optimization on compatible hosting setups and includes several image optimization features without a monthly image quota.

Some local optimization tools depend on what your server allows, so the exact setup can vary by host.

Best for: sites that want to process many images and have compatible hosting.

Imagify

Imagify uses automatic compression and supports modern formats such as WebP and AVIF.

Its free plan has a monthly optimization allowance, so I would check how much media you normally upload before relying on it for a large image library.

Best for: users who want a simple automated workflow and have a relatively modest monthly image volume.

7. You can optimize WordPress images without a plugin

For a small blog, manual optimization may be all you need.

My no-plugin workflow is simple:

  1. Resize the image to sensible dimensions.
  2. Compress it in Squoosh or another image tool.
  3. Compare JPEG, WebP, or AVIF when useful.
  4. Upload the smallest version that still looks good.
  5. Let WordPress handle responsive image markup and normal lazy loading.

This takes a little more time per upload, but you know exactly what is being added to the site.

It also avoids installing a plugin whose only job is fixing images you could have optimized before uploading.

8. Recheck the page after making changes

After optimizing a few important images, test the page again.

Do not judge success only by whether the image file became smaller.

Check whether:

  • The page still looks sharp
  • The hero image appears quickly
  • No important image is being lazy-loaded unnecessarily
  • The mobile version still looks correct
  • PageSpeed Insights shows an actual improvement

If images are no longer one of the main problems, stop optimizing them and move on to the next bottleneck.

Templates worth a look

Leave a comment

Your email address will not be published. Required fields are marked *