SammaPix
Back to Blog
WordPressJanuary 10, 2026· 11 min read

How to Optimize Images for WordPress: The Complete 2026 Guide

Images are the single largest cause of poor Core Web Vitals scores on WordPress sites. Most tutorials tell you to install a plugin and let it handle everything. This guide shows you a better approach — optimize images before they ever touch your media library — then explains how WordPress itself handles the rest.

Why image optimization matters for WordPress

WordPress powers over 43% of all websites on the internet. It is the most common platform — and unoptimized images are the most common performance problem. When Google runs a Lighthouse audit on your site, images are almost always the first item flagged.

The reason is direct: most WordPress users upload photos straight from their camera or phone. A single iPhone 15 photo can be 8–15 MB. A post with five hero images at that size downloads 40–75 MB before the page renders. On a 4G connection, that is a 10–15 second load time — Google considers anything above 2.5 seconds a failing LCP score.

According to Google's Largest Contentful Paint guidance, a “good” LCP score is under 2.5 seconds. LCP is almost always driven by the largest image on screen — typically a hero image, featured image, or product photo. The fastest path to a better LCP score is a smaller, properly formatted image delivered quickly.

Core Web Vitals are a direct Google ranking signal since 2021. A poor LCP score does not just hurt user experience — it measurably suppresses your search rankings relative to competitors whose pages load faster.

Website analytics dashboard showing performance metrics and Core Web Vitals
Core Web Vitals scores are directly tied to image weight — Photo by Carlos Muza on Unsplash

The most common WordPress image mistakes

Before walking through the correct workflow, it helps to name what most people get wrong. These are the patterns that cause the most damage to WordPress performance:

Uploading camera originals directly

A 5–15 MB camera JPEG becomes your media library's “full size” original. WordPress thumbnails are generated from this file and stored alongside it. Your server accumulates enormous files it should never have received.

Relying entirely on plugins to fix bad uploads

Plugins like Smush or Imagify compress and convert images after upload, but the originals are still stored on your server. Every thumbnail generation on upload, every image edit in the media library, every backup — all operate on the oversized original.

Uploading JPEG when WebP is supported

WordPress has accepted WebP uploads since version 5.8. Uploading JPEG in 2026 means serving files 25–35% larger than necessary to every visitor whose browser supports WebP — which is 97%+ of all browsers globally.

Uploading images much wider than the content area

A 6000 px wide photo uploaded to a blog with a 900 px content column means WordPress serves a thumbnail from a 6000 px source. That source is stored on disk and used for every thumbnail crop — including retina sizes. Resize before uploading to match actual display dimensions.

Ignoring EXIF metadata

GPS coordinates, device model, and timestamp are embedded in every phone photo. WordPress does not strip EXIF data on upload. Every image you publish potentially broadcasts your location.

Photographer reviewing images on camera screen with laptop nearby
Camera originals should never go straight into the WordPress media library — Photo by ShareGrid on Unsplash

The correct workflow: optimize before you upload

The most effective approach is a four-step pre-upload workflow. Run these steps on every image before it touches your WordPress media library. All four can be done entirely in your browser — no uploads to third-party servers, no plugins required at this stage.

STEP 01

Compress before uploading

SammaPix Compress

Camera JPEGs are often 4–15 MB. WordPress will accept them, but it will store the original alongside every thumbnail it generates, bloating your media library immediately. Compress the source file to under 200–500 KB before you ever open the media uploader.

  • Drop your images into SammaPix Compress — no upload, no account required
  • Set quality to 80% for photos, 85–90% for product or portfolio shots
  • Batch compress an entire folder and download as ZIP in one step
  • Files never leave your browser — safe for client work and private content
STEP 02

Convert to WebP

SammaPix WebP Converter

WordPress 5.8 added native WebP support. Every modern browser supports WebP. Uploading WebP instead of JPEG reduces file size by an additional 25–35% at equal visual quality — meaning faster page loads, better LCP scores, and lower storage costs.

  • Convert JPEG, PNG, and GIF files to WebP before uploading
  • Use quality 80 for lossy (photos) — indistinguishable from the original
  • WordPress will generate WebP thumbnails automatically from a WebP source
  • No plugin needed for WebP delivery when you upload WebP directly
STEP 03

Resize to correct dimensions

SammaPix ResizePack

A WordPress blog content area is typically 800–1200 px wide. Uploading a 6000 × 4000 px camera photo and relying on WordPress thumbnails still stores the 6000 px original on your server. Resize to the largest size you actually need before uploading.

  • Resize to match your theme's content width — usually 1200 px or 1440 px maximum
  • For featured images: check your theme's featured image dimensions
  • For product images (WooCommerce): match your theme's product image size setting
  • Use 2x dimensions for retina if needed, but not camera-original 6000 px
STEP 04

Remove EXIF data for privacy

SammaPix EXIF Lens

Every photo taken with a smartphone or modern camera embeds EXIF metadata — including GPS coordinates, device model, and date/time. WordPress does not strip this by default. Anyone who downloads your images can see exactly where they were taken.

  • Use EXIF Lens to inspect what metadata is embedded before uploading
  • Strip GPS location data, device identifiers, and shooting conditions
  • Especially important for home business owners, family bloggers, and client photographers
  • EXIF removal also reduces file size by a small but measurable amount

Free — no signup, no upload, no limits

Start with SammaPix Compress — process all four steps before your next WordPress upload

WordPress image settings you should configure

Once your images are pre-optimized, there are several WordPress settings worth reviewing. These control how WordPress handles images after upload — including thumbnail generation, maximum upload size, and srcset behavior.

Media settings (Settings → Media)

WordPress generates three default thumbnail sizes on every upload: thumbnail (150×150), medium (300×300), and large (1024×1024). It also keeps the full original. This means a single upload creates four files on disk.

Review these sizes and align them with what your theme actually uses. There is no benefit to generating sizes your theme never requests. You can disable unused sizes or adjust dimensions under Settings → Media in the WordPress admin. The official WordPress developer documentation covers media handling in detail.

Responsive images and srcset

WordPress automatically adds srcset attributes to images inserted via the block editor or wp_get_attachment_image(). This tells the browser to download only the size appropriate for the current viewport — a mobile visitor gets a 480 px image rather than a 1400 px one.

This system works best when you have uploaded images wider than the largest display size you need, so WordPress has something to downscale from. If you uploaded a 1200 px image and your theme requests a 1400 px thumbnail, WordPress will serve the 1200 px original with no downscaling — this is why correct pre-upload resizing matters.

WordPress admin dashboard on a computer screen
WordPress generates multiple thumbnail sizes from every uploaded image — Photo by Stephen Phillips on Unsplash

Lazy loading in WordPress

WordPress has added the loading="lazy" attribute to images automatically since version 5.5. This tells the browser to defer loading images that are below the fold — images not visible in the initial viewport are only downloaded when the user scrolls near them.

The one important exception: your hero image or the Largest Contentful Paint image should never be lazy loaded. WordPress applies loading="eager" to the first image in the content area since 6.3 — but if your theme controls the hero image independently, verify that it is not lazy loaded.

You can read the full implementation details and browser compatibility notes in Google's guide to browser-level lazy loading.

CDN for WordPress images

Even perfectly compressed images load slowly if they are served from a single origin server far from the visitor. A Content Delivery Network (CDN) distributes your static assets — including images — across servers globally, so each visitor downloads images from a location geographically close to them.

For WordPress, the simplest CDN path is Cloudflare. The free tier proxies your entire site through their global network, caching images at edge nodes worldwide. This alone can reduce image delivery latency by 50–80% for visitors outside your origin server's region.

Alternatives include Bunny CDN (very affordable, excellent for WordPress), KeyCDN, and the Jetpack CDN feature (free for WordPress.com-connected sites). If your hosting plan includes a CDN — WP Engine, Kinsta, and Cloudways all do — make sure it is enabled for the /wp-content/uploads/ path.

WebP delivery: plugins vs pre-conversion

There are two approaches to serving WebP on WordPress. Understanding the difference helps you choose the one that fits your workflow.

Plugin-based server-side conversion

Plugins like ShortPixel, Imagify, and WebP Express generate WebP versions of your uploaded JPEGs and PNGs on the server. They then serve the WebP version to browsers that support it (detected via the Accept: image/webp request header) and fall back to the original for browsers that do not.

The advantage: it handles conversion automatically. The disadvantage: your server stores both the original and the WebP version of every image and every thumbnail — potentially doubling your storage footprint. It also uses server CPU or an external API quota on every new upload.

Pre-conversion before upload (recommended)

The cleaner approach is to convert images to WebP before uploading. WordPress 5.8+ accepts WebP uploads natively and generates WebP thumbnails from a WebP source. No plugin needed for WebP delivery — you are serving WebP directly, not converting on the fly.

This approach means your media library contains only WebP files. Smaller originals, smaller thumbnails, no duplicate storage, no server-side conversion overhead. The SammaPix WebP Converter handles the conversion in your browser before anything reaches WordPress.

Developer reviewing website performance data on multiple screens
Pre-converting to WebP before upload eliminates the need for server-side conversion plugins — Photo by Ilya Pavlov on Unsplash

Comparison: SammaPix workflow vs Smush vs ShortPixel vs Imagify

All four approaches can produce well-optimized WordPress images. The differences come down to where optimization happens, what you store on disk, and what it costs.

ToolApproachWebPEXIF StripPrivacyCost
SammaPix (pre-upload)RecommendedClient-side, before uploadFree
SmushServer-side, after uploadFree / $7.08/mo
ShortPixelCloud API, after uploadFree (100/mo) / Paid
ImagifyCloud API, after uploadFree (200/mo) / Paid

ShortPixel and Imagify are both excellent plugins for teams who need server-side automation — especially for large existing libraries with thousands of images already uploaded. The free quotas (100/month and 200/month respectively) are suitable for low-volume sites, but grow expensive at scale.

Smush from WPMU DEV is the most widely installed WordPress image optimization plugin with over one million active installs. Its free tier compresses and strips EXIF metadata, but WebP conversion requires the paid Smush Pro plan. For most new WordPress projects in 2026, the pre-upload workflow using SammaPix avoids both plugin complexity and recurring costs.

Complete WordPress image optimization checklist for 2026

Compress images to under 200–500 KB before uploading
Convert to WebP format before uploading (WordPress 5.8+ accepts WebP natively)
Resize to match your theme's maximum display width — typically 1200–1440 px
Strip EXIF metadata, especially GPS location data
Review WordPress Media settings and remove unused thumbnail sizes
Verify your hero / LCP image is not lazy loaded
Enable a CDN for your uploads directory (Cloudflare, Bunny CDN, or hosting CDN)
Test Core Web Vitals with PageSpeed Insights after publishing image-heavy pages

Frequently asked questions

Does WordPress automatically optimize images when I upload them?

WordPress resizes images to generate thumbnails and adds srcset attributes for responsive delivery. It does not compress the original, convert to WebP, or strip EXIF metadata. Those optimizations must be done before uploading or via a plugin after the fact.

What image size should I upload to WordPress?

Upload images no wider than the largest size your theme will display — typically 1200–1440 px for full-width images and 800–1200 px for content column images. Uploading camera originals at 6000+ px gives WordPress a source file it will never use at full size and stores needless data on disk.

Should I use WebP or JPEG for WordPress in 2026?

WebP. WordPress accepts WebP uploads natively since version 5.8, and over 97% of browsers support WebP globally. Uploading WebP instead of JPEG means your media library stores smaller originals and generates smaller thumbnails — no plugin needed for WebP delivery.

Does WordPress strip EXIF metadata on upload?

No. WordPress does not strip EXIF data by default. GPS coordinates, device model, and timestamp remain embedded in uploaded images. Use SammaPix EXIF Lens to inspect and remove metadata before uploading, or configure a plugin like Imagify or ShortPixel to strip EXIF on upload.

Is Smush better than ShortPixel for WordPress?

Both are solid plugins, but they target different needs. Smush is a good free option for basic compression and EXIF stripping, but WebP conversion requires the paid plan. ShortPixel includes WebP on its free tier (100 images/month) and achieves slightly better compression ratios. For unlimited free optimization, the pre-upload approach using SammaPix outperforms both.

How do I check if my WordPress images are affecting Core Web Vitals?

Run your page URL through PageSpeed Insights (pagespeed.web.dev) or Google Search Console's Core Web Vitals report. Look for 'Properly size images', 'Serve images in next-gen formats', and 'Efficiently encode images' in the Opportunities section. These three flags together indicate unoptimized images are hurting your LCP score.

Share this article

Optimize your WordPress images before the next upload

Compress, convert to WebP, resize, and strip EXIF metadata in seconds — all in your browser, no upload required. Free with no limits.