Serve WebP in WordPress Without a Plugin
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
Compress, convert, and resize images in your browser. Nothing gets uploaded.
Open MiniPx →