Image Optimization in WordPress: WebP, AVIF, ShortPixel, Imagify and EWWW

Images are often the heaviest part of a page. How the WebP and AVIF formats work, and what to consider when choosing an optimization plugin.

On most sites, images make up the largest share of a page’s weight. Large images make the page load slowly, especially on mobile, which affects both the visitor’s experience and how search engines assess the page. Image optimization is therefore one of the most worthwhile ways to get a faster site.

Start with the original

The simplest approach is not to upload unnecessarily large images. An image displayed at 800 pixels wide does not need to be 6000 pixels wide. Resize before uploading and save photos as JPEG. WordPress creates several smaller sizes of each image on its own and picks a suitable size in the page, but the original file remains and takes up space.

WebP and AVIF

WebP and AVIF are modern image formats that often give smaller files than JPEG at comparable quality. WordPress has supported uploading WebP images since version 5.8 and AVIF since version 6.5. Newer browsers handle both formats, but it is worth checking which browsers your visitors use. A good optimization plugin can create modern formats and deliver them only to browsers that support them, with the original image as a fallback.

Three common plugins

  • ShortPixel – compresses images via an external service and can create WebP and AVIF versions. Works with a credit system: a certain amount is included, and more can be purchased.
  • Imagify – a similar setup with compression via an external service, different compression levels and conversion to modern formats.
  • EWWW Image Optimizer – can optimize on your own server, and also offers a cloud service. A free and a paid version are available.

Comparison

PluginWhere does the work happen?Modern formatsKeep in mind
ShortPixelExternal serviceWebP and AVIFLimited volume in the free version
ImagifyExternal serviceYesLimited volume in the free version
EWWWOwn server or cloud serviceYesYour server’s capabilities determine what is possible

Always check each plugin’s current features and terms, as they change over time.

Lossless or lossy?

Lossless compression removes unnecessary data without changing the image, but gives moderate savings. Lossy compression gives smaller files but lowers quality slightly. For photos on the web, moderate lossy compression is usually perfectly fine, but for product images, graphics with text and artistic images you should look closely at the result.

More than compression

  • Lazy loading – images below the visible area don’t need to load straight away. WordPress adds this by default to images in content, but the image at the very top should not be delayed.
  • Width and height – specify them so that the page doesn’t jump when the image loads.
  • Alt text – it helps both accessibility and search engines.

Our tip

Take a backup before optimizing the whole media library retroactively, and test on a few images first. Decide whether you want the plugin to keep the originals, since that makes it possible to undo but takes up more storage space. Choose a plugin whose way of working suits your host and your privacy policy, because services that compress externally send your images to third parties.

A Greater Star

Need help with your WordPress site?

The people behind this site build and look after WordPress sites every day at A Greater Star – new sites, custom plugins, support agreements, hosting, security and speed.