How to Optimize Images for WordPress (Speed, SEO, and File Size)


If a WordPress site feels slow, images are the most likely reason — more often than the theme, the hosting, or the plugin count people usually blame first. A camera or phone photo uploaded straight into the Media Library can easily be 4-8MB, and WordPress will happily let you use it at full size even though it’s only ever displayed at a few hundred pixels wide on the page.
Optimization plugins help, but they’re compensating for a problem that’s easier to just not create in the first place: uploading a heavy, wrong-format image and letting a plugin try to fix it after the fact. Here’s how to get images right before they ever touch your Media Library.
WordPress can generate multiple image sizes from the original you upload, so starting with an unnecessarily large source image can increase your media storage and processing needs. A 4000px-wide photo uploaded for a blog post that displays images at 800px wide means WordPress is storing (and your server is holding) far more data than the site actually uses.
Resize to roughly the largest width your theme will ever display the image at — usually somewhere between 1200-2000px for a full-width featured image — using the resize tool, or crop it first if you only need part of the original photo.
WordPress core has supported WebP uploads since version 5.8, and WebP can produce smaller files than JPG or PNG at similar visual quality, although the exact savings depend on the image and compression settings — a meaningful difference across a site with dozens or hundreds of images. Convert existing JPGs and PNGs before uploading:
If a specific plugin or theme still expects JPG or PNG, that compatibility requirement should take priority — but for standard blog and page content, WebP is worth defaulting to.
Format alone isn’t the whole story — the same WebP image can still be needlessly large depending on the export settings. Run images through a compressor as a final check before they go into the Media Library:
Doing this before upload means every generated thumbnail size WordPress creates from that image starts from an already-lean file, instead of multiplying a bloated original across five or six different sizes.
This step costs nothing in file size but matters just as much for WordPress SEO. Rename the file to something descriptive with your target keyword before uploading — blue-ceramic-coffee-mug.jpg tells Google (and screen readers) far more than IMG_4821.jpg. Then fill in the alt text field in the Media Library with a genuine, specific description of the image, not just a repeated keyword. Descriptive alt text also helps search engines understand what an image represents and improves accessibility for people using screen readers.
WordPress’s Site Icon setting handles this, but it works best from a clean, pre-sized source image rather than whatever logo file happens to be lying around. Run your logo through the favicon generator first, then upload the result under Appearance → Site Icon, and use the favicon checker afterward to confirm it’s actually displaying in browser tabs.
Camera and phone photos carry EXIF metadata — device model, GPS coordinates, timestamps — none of which needs to live on your live site, and which adds a small amount of unnecessary weight to every image. Run images through the image metadata remover as part of your standard pre-upload routine.
When someone shares a WordPress post on Facebook, LinkedIn, or X, the image that shows up (the Open Graph image) is a separate thing from your featured image display on the site itself, and it’s easy to end up with a stretched or oddly cropped preview. Build one with the OG image generator, and confirm how it will actually render with the OG preview tool before publishing.
Will using WebP break anything in WordPress?
For any WordPress version 5.8 or newer, WebP is natively supported for both upload and display. Very old themes or plugins that specifically expect JPG or PNG are the main exception worth checking for.
How much does image optimization actually affect page speed scores?
Images often account for a large portion of a content-heavy WordPress page, so reducing unnecessary image weight can make a noticeable difference to loading performance and Core Web Vitals.
Should I resize images to the exact display size, or slightly larger?
Slightly larger is safer — WordPress generates its own set of smaller thumbnail sizes from whatever you upload, so give it a source that comfortably covers your largest display size (like a full-width featured image) rather than the smallest.
Do I need to do all of this manually every time?
Once it becomes a habit — resize, convert, compress, name, alt text — it takes under a minute per image, and it’s a lot faster than troubleshooting a slow site after the fact or manually cleaning up hundreds of oversized images later.
A little image preparation before uploading can save you from a lot of performance and maintenance headaches later. Explore the free image optimization tools to prepare your next WordPress images before they go live.
Every tool mentioned in this guide is free, works in your browser, and doesn't need an account.
Explore All Tools