Optimizing images in WordPress
WordPress already does a lot for your images, but only if you give it good originals. This guide sums up what it does by default and what's up to you.
What WordPress does automatically
Current WordPress versions include several optimizations out of the box:
- Intermediate sizes: when you upload an image, several versions are generated (thumbnail, medium, large…) plus others defined by your theme and plugins.
- Automatic srcset and sizes on content images, using those sizes.
- Big image threshold: since 5.3, images larger than 2560 px are automatically scaled down to that size (the original is kept separately).
- Native lazy loading since 5.5, with the first content image excluded since 5.9.
- fetchpriority="high" on the image most likely to be the LCP, since 6.3.
- WebP support (since 5.8) and AVIF (since 6.5) if the server has a compatible image library.
What's still up to you
WordPress generates intermediate sizes from the file you upload, typically at quality 82 and in the same format. That means:
- If you upload a 9 MB JPEG exported at quality 100, everything starts from there and the media library grows needlessly.
- If you upload PNGs for photos, every variant will be a heavy PNG.
- EXIF metadata (including GPS location) may remain in the original.
The most cost-effective improvement is optimizing before uploading.
Recommended workflow
- Resize to a reasonable maximum. For most themes, 2000–2560 px wide is enough even for full-screen images.
- Pick the format. If your server supports AVIF or WebP, upload those directly: WordPress will generate intermediate sizes in that format. If you're unsure, upload JPEG optimized with MozJPEG.
- Compress at a realistic quality: JPEG 82, WebP 80 or AVIF 60.
- Use descriptive file names (
blue-running-shoes.webpbeatsIMG_4021.jpg) and fill in the alt text when uploading.
With ImageZap you can do steps 1–3 at once for a whole batch: choose Max width 2560, the format, and download the ZIP.
Check whether your server supports WebP and AVIF
Go to Tools > Site Health > Info > Media Handling. There you'll see whether GD or Imagick is used and which formats it supports. If AVIF isn't listed, WordPress won't be able to generate its intermediate sizes and you should stick with WebP or JPEG.
The official Modern Image Formats plugin, from the WordPress performance team, can automatically generate WebP or AVIF versions of the JPEGs you upload.
The featured image and LCP
Although WordPress tries not to lazy-load the first image, many themes and page builders (sliders, cover blocks, background images) bypass that logic. Check your LCP element with PageSpeed Insights and make sure it:
- Doesn't have
loading="lazy". - Has
fetchpriority="high". - Isn't a background image loaded by JavaScript.
If your theme uses the featured image as a CSS background, consider preloading it or switching to a regular image block.
Optimization plugins?
Plugins that compress on the server can be useful on sites with many authors, but they consume resources or external service quotas. If you control what gets uploaded, optimizing beforehand is simpler, faster and adds no dependencies.
Frequently asked questions
Does WordPress convert images to WebP automatically?
Not by default. It can with the Modern Image Formats plugin or an optimization plugin. If you upload WebP or AVIF, it will generate intermediate sizes in that format.
What quality does WordPress use when resizing?
82 for JPEG by default, adjustable with the wp_editor_set_quality filter. That's why it's best to upload originals that are optimized but not overly compressed.
Is EXIF metadata removed?
WordPress keeps some of it in the database and the original file may retain it. If privacy matters to you, strip it before uploading; ImageZap always does.
Can I use AVIF if my host doesn't support it?
You can upload it and it will display in browsers, but WordPress won't be able to generate intermediate sizes. In that case, upload WebP.