MiniPx
Blog
🔒 Images never leave your browser
← Blog

Serve WebP in WordPress Without a Plugin

By Gaurav Bhowmick

WordPress image plugins add bloat and often require paid tiers for WebP. Here is how to serve WebP images without installing anything on your WordPress site.

Why skip the plugin. Popular plugins like ShortPixel, Imagify, and Smush either limit free usage or require server-side processing. They add database queries, cron jobs, and sometimes slow down your admin panel. If you are comfortable uploading files, you can handle WebP yourself.

Method 1: Pre-convert and upload. The simplest approach. Convert your images to WebP before uploading to WordPress using a tool like MiniPx. Upload the WebP file directly to your Media Library. WordPress 5.8+ supports WebP uploads natively — no configuration needed. Your theme serves the WebP file like any other image.

Method 2: .htaccess rewrite rules. Keep both JPEG and WebP versions on your server. Add rewrite rules that serve the WebP version when the browser supports it. Upload photo.jpg and photo.jpg.webp to the same directory. The .htaccess rule checks the Accept header and rewrites the request to the WebP file if available.

Method 3: picture element in your theme. Edit your theme templates to use the HTML picture element with a WebP source and JPEG fallback. This gives you complete control over which browsers get which format. It requires theme modification but works reliably across all hosting environments.

The pre-convert approach is best for most people. Converting to WebP before upload is the simplest, most reliable, and fastest approach. No server configuration, no plugin dependencies, no compatibility issues. Just convert your images to WebP in MiniPx and upload them to WordPress.

WordPress 6.1+ also generates WebP versions of uploaded images automatically if your server has the required libraries (libwebp). Check by uploading a JPEG and looking at the generated thumbnails — if they are .webp files, your server already handles it.

Frequently asked questions

Does WordPress support WebP uploads?
Yes, since WordPress 5.8 (July 2021). You can upload .webp files directly to the Media Library without any plugins or configuration changes.
Will WebP images work in all email clients?
No. Many email clients (Outlook, older Gmail) do not support WebP. If you use WordPress images in email newsletters, keep JPEG or PNG versions for email use.
Does converting to WebP break existing image links?
If you replace existing JPEG files with WebP, yes — old URLs will break. Either use the .htaccess method to serve WebP transparently, or only use WebP for new uploads and keep existing JPEGs.
How much smaller are WebP images compared to JPEG?
Typically 25-35% smaller at the same visual quality. A 200 KB JPEG becomes roughly 130-150 KB as WebP. The savings compound across an image-heavy WordPress site.
🔧
Try MiniPx — free, no signup

Compress, convert, and resize images in your browser. Nothing gets uploaded.

Open MiniPx →