{"id":12304,"date":"2026-11-03T11:48:00","date_gmt":"2026-11-03T17:48:00","guid":{"rendered":"https:\/\/infiniteuploads.com\/?p=12304"},"modified":"2026-11-03T11:48:33","modified_gmt":"2026-11-03T17:48:33","slug":"convert-images-to-webp-wordpress","status":"publish","type":"post","link":"https:\/\/infiniteuploads.com\/blog\/convert-images-to-webp-wordpress\/","title":{"rendered":"How to Convert Images to WebP in WordPress (4 Ways)"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><p class=\"wp-block-paragraph\">You can convert an image to WebP in WordPress four ways. Export it as WebP before you upload. Add one small filter so WordPress makes WebP versions itself. Install a free plugin. Or let your CDN convert and serve WebP automatically, with your originals left alone.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I'll walk through each one with real steps, then show you how to check it actually worked. Most guides skip that part, and it's where most sites quietly fail.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-quick-answer\">The quick answer<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>A handful of images:<\/strong> convert them on your computer first, then upload the .webp files. WordPress has accepted WebP uploads since 5.8.<\/li>\n\n<li><strong>Every new upload, no plugin:<\/strong> use the core <code>image_editor_output_format<\/code> filter so WordPress saves JPEG and PNG sizes as WebP.<\/li>\n\n<li><strong>Every new upload, with settings:<\/strong> the free Modern Image Formats plugin from the WordPress Performance Team.<\/li>\n\n<li><strong>Old and new images, no regenerating, AVIF too:<\/strong> convert on delivery. It's the simplest and quickest option, it puts no strain on your server, and it's what Infinite Uploads Image Optimization does on the Business plan.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"before-you-start-check-your-server-can-make-webp\">Before you start: check your server can make WebP<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress doesn't encode images itself. It hands the job to your server's image library, Imagick or GD, and WebP only works if that library supports it. The <a href=\"https:\/\/make.wordpress.org\/core\/2021\/06\/07\/wordpress-5-8-adds-webp-support\/\">WordPress 5.8 WebP announcement<\/a> says exactly that. Checking takes 30 seconds.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In your dashboard, go to <strong>Tools &gt; Site Health<\/strong>.<\/li>\n\n<li>Click the <strong>Info<\/strong> tab.<\/li>\n\n<li>Open the <strong>Media Handling<\/strong> section.<\/li>\n\n<li>Look at <strong>Active editor<\/strong>, then find WEBP in the supported formats list for that editor (ImageMagick or GD).<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/infiniteuploads.com\/wp-content\/uploads\/2026\/11\/screenshot-displaying-imagemagick-settings-white-background-red-highlights-version-details.webp\" alt=\"Tools &gt; Site Health &gt; Info &gt; Media Handling on a test WordPress 7.1.4 site, showing the image editor and its supported formats\" class=\"wp-image-14918\"><figcaption class=\"wp-element-caption\">Site Health on a test WordPress 7.1.4 site. Imagick is the active editor, and both ImageMagick and GD list WebP and AVIF.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If WebP isn't listed, methods 2 and 3 won't work on your host until they add it. Methods 1 and 4 don't depend on your server, so they still do.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-1-convert-images-to-webp-before-you-upload\">Method 1: Convert images to WebP before you upload<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">No plugin, no code, and it's fine for a few images. You convert the file on your computer, then upload the .webp like any other image. WordPress makes its thumbnails and other sizes in the same format as the file you upload, so a WebP upload gets WebP sizes.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the image in <a href=\"https:\/\/squoosh.app\/\">Squoosh<\/a>, Google Chrome Labs' free tool that compresses images right in your browser.<\/li>\n\n<li>Pick <strong>WebP<\/strong> as the output format on the right.<\/li>\n\n<li>Drag the quality slider down until you see a difference, then nudge it back up a little.<\/li>\n\n<li>Download the file and upload it to <strong>Media &gt; Add New Media File<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Comfortable in a terminal? Google's <a href=\"https:\/\/developers.google.com\/speed\/webp\/docs\/cwebp\">cwebp<\/a> tool does the same thing in one line. Quality runs from 0 to 100 and defaults to 75.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cwebp -q 80 photo.jpg -o photo.webp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The catch is obvious. It's manual, it does nothing for the images already in your library, and every browser gets the WebP, with no JPEG fallback.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-2-make-wordpress-create-webp-with-a-filter\">Method 2: Make WordPress create WebP with a filter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress 5.8 added a filter called <a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/image_editor_output_format\/\">image_editor_output_format<\/a>. It tells WordPress which format to save generated image sizes in. Map JPEG and PNG to WebP and every new upload gets WebP sizes. Add this to a code snippets plugin or your child theme's functions.php:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter( 'image_editor_output_format', function( $formats ) {\n\t$formats['image\/jpeg'] = 'image\/webp';\n\t$formats['image\/png']  = 'image\/webp';\n\treturn $formats;\n} );<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Confirm WebP shows up in Site Health (see above).<\/li>\n\n<li>Add the snippet and save.<\/li>\n\n<li>Upload a new JPEG.<\/li>\n\n<li>Open it in <strong>Media &gt; Library<\/strong> and check the file URLs for the generated sizes end in .webp.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Three things to know. It only touches new uploads, so existing images need regenerating with a tool like <code>wp media regenerate<\/code>. There's no fallback, so every visitor gets WebP. And in WordPress 7.1, sites on Chrome or Edge 137 and newer process images in the browser instead of on the server, but the <a href=\"https:\/\/make.wordpress.org\/core\/2026\/07\/22\/client-side-media-processing-in-wordpress-7-1\/\">7.1 client-side media processing post<\/a> says that path honors this same filter. So the snippet still works. We dug into what else 7.1 changed in <a href=\"https:\/\/infiniteuploads.com\/blog\/does-wordpress-7-1-optimize-your-images\/\">does WordPress 7.1 optimize your images?<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-3-convert-to-webp-with-a-plugin\">Method 3: Convert to WebP with a plugin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you'd rather click than code, <a href=\"https:\/\/wordpress.org\/plugins\/webp-uploads\/\">Modern Image Formats<\/a> is the free plugin from the WordPress Performance Team. It has 100,000+ active installs and is tested up to WordPress 7.1.4.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Plugins &gt; Add New Plugin<\/strong>, search for <strong>Modern Image Formats<\/strong>, then install and activate it.<\/li>\n\n<li>Go to <strong>Settings &gt; Media<\/strong> and scroll to the Modern Image Formats section.<\/li>\n\n<li>Set <strong>Image output format<\/strong> to <strong>WebP<\/strong>. It picks AVIF by default when your server supports it.<\/li>\n\n<li>Decide on <strong>Output fallback images<\/strong>. Left unchecked, WordPress only makes the WebP sizes and keeps your original upload as is. Check it if you also want JPEG or PNG copies of every size.<\/li>\n\n<li>Click <strong>Save Changes<\/strong>, then upload a test image.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/infiniteuploads.com\/wp-content\/uploads\/2026\/11\/screenshot-of-image-format-settings-with-webp-selected-featuring-gray-text.webp\" alt=\"Settings &gt; Media in WordPress with the Modern Image Formats plugin, image output format set to WebP\" class=\"wp-image-14919\"><figcaption class=\"wp-element-caption\">Modern Image Formats 2.7.1 under Settings &gt; Media, with the output format set to WebP.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Like the filter, it only converts new uploads. Its <a href=\"https:\/\/wordpress.org\/plugins\/webp-uploads\/\">plugin page<\/a> says to regenerate existing images with Regenerate Thumbnails or <code>wp media regenerate<\/code>. One nice touch: it skips the WebP version when it would be bigger than the original.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The big optimization plugins convert too. Per their own plugin pages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/wordpress.org\/plugins\/ewww-image-optimizer\/\">EWWW Image Optimizer<\/a> includes WebP conversion in the free version. One-click WebP and AVIF conversion and delivery is a premium feature.<\/li>\n\n<li><a href=\"https:\/\/wordpress.org\/plugins\/imagify\/\">Imagify<\/a> includes WebP conversion on its free plan, which covers 20 MB of images a month (about 200 images).<\/li>\n\n<li><a href=\"https:\/\/wordpress.org\/plugins\/wp-smushit\/\">Smush<\/a> lists serving WebP and AVIF automatically as a Pro feature.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We compared these in more depth in <a href=\"https:\/\/infiniteuploads.com\/blog\/best-wordpress-image-optimization-plugins\/\">the best WordPress image optimization plugins<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-4-convert-to-webp-automatically-with-infinite-uploads\">Method 4: Convert to WebP automatically with Infinite Uploads<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every method so far converts files on your server and stores extra copies. Infinite Uploads works the other way, and honestly, it's the simplest and quickest of the four. Your media lives in the cloud and goes out through our CDN's 119+ edge locations. With <a href=\"https:\/\/infiniteuploads.com\/features\/image-optimization\/\">Image Optimization<\/a> turned on, each JPEG or PNG is converted when a visitor asks for it, then cached at the edge. Your server does none of that work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each browser gets the best format it supports: AVIF first, then WebP, then your original as the fallback. Images are right sized and compressed on the way out. And your <a href=\"https:\/\/infiniteuploads.com\/docs\/image-optimization\/does-image-optimization-change-my-original-files\/\">original files are never changed<\/a>, so there's nothing to regenerate and nothing to undo.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/infiniteuploads.com\/wp-content\/uploads\/2026\/11\/website-screenshot-featuring-cloud-media-services-blue-icons-and-infinite-uploads-logo.webp\" alt=\"Infinite Uploads plugin screen listing Image optimization, WebP and AVIF served automatically to supporting browsers, on the Business plan\" class=\"wp-image-14920\"><figcaption class=\"wp-element-caption\">The Infinite Uploads plugin screen on a test site. Image optimization is listed as a Business plan feature.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">One honest note before the steps. Image Optimization is a Business plan feature. The Free plan gives you 10 GB of cloud storage and 20 GB of CDN bandwidth a month, but <a href=\"https:\/\/infiniteuploads.com\/docs\/getting-started\/whats-included-in-the-infinite-uploads-free-plan\/\">it doesn't include image optimization<\/a>. Once you're on Business, it takes a minute (<a href=\"https:\/\/infiniteuploads.com\/docs\/image-optimization\/enabling-image-optimization\/\">full steps in the docs<\/a>):<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install Infinite Uploads, connect your account and move your media to the cloud.<\/li>\n\n<li>Open the <strong>Infinite Uploads<\/strong> menu in your dashboard and find the <strong>Image Optimization<\/strong> section.<\/li>\n\n<li>Set <strong>Enable Image Optimization<\/strong> to <strong>Yes<\/strong>.<\/li>\n\n<li>Leave the optimization level on <strong>Balanced<\/strong> and keep AVIF and WebP both checked. That's the default.<\/li>\n\n<li>Click <strong>Save Settings<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">New settings apply the next time each image is requested. Want them live right now? <a href=\"https:\/\/infiniteuploads.com\/docs\/image-optimization\/purging-the-cdn-cache-after-changing-settings\/\">Purge the CDN cache<\/a>. You can also <a href=\"https:\/\/infiniteuploads.com\/docs\/image-optimization\/setting-a-maximum-image-width\/\">set a maximum image width<\/a> and <a href=\"https:\/\/infiniteuploads.com\/docs\/image-optimization\/excluding-images-from-optimization\/\">exclude images<\/a> you don't want touched. If you already run another plugin's WebP conversion, <a href=\"https:\/\/infiniteuploads.com\/docs\/image-optimization\/do-i-still-need-other-image-optimization-plugins\/\">turn that part off<\/a> so the two don't double up. Lazy loading can stay.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Business starts at $29 a month billed monthly, or $24 a month billed yearly. See every plan on <a href=\"https:\/\/infiniteuploads.com\/pricing\/\">the pricing page<\/a>. If you're weighing up delivery-time tools, here's <a href=\"https:\/\/infiniteuploads.com\/optimole-alternative\/\">how Infinite Uploads compares with Optimole<\/a>, which also converts to WebP and AVIF in the cloud.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Want to see it on your own images? <a href=\"https:\/\/infiniteuploads.com\/pricing\/\">Try any plan free for 7 days<\/a>.<\/strong> Your trial includes the features of the plan you pick, so choose Business to test Image Optimization.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-check-your-images-are-really-webp\">How to check your images are really WebP<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A .jpg in the URL doesn't mean a JPEG reached the browser, and a plugin saying \"converted\" doesn't mean it's being served. Check what actually arrives:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open a page on your site in Chrome and press F12 to open DevTools.<\/li>\n\n<li>Click the <strong>Network<\/strong> tab, filter by <strong>Img<\/strong> and reload the page.<\/li>\n\n<li>Click an image and look at the <strong>Content-Type<\/strong> response header.<\/li>\n\n<li><code>image\/webp<\/code> or <code>image\/avif<\/code> means it worked. <code>image\/jpeg<\/code> or <code>image\/png<\/code> means it didn't.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">With Infinite Uploads, also check that the image URL is on your infiniteuploads.cloud CDN domain. If it isn't, the image is still coming from your server. <a href=\"https:\/\/infiniteuploads.com\/docs\/image-optimization\/my-images-arent-being-optimized\/\">My images aren't being optimized<\/a> covers the usual causes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"which-method-should-you-pick-\">Which method should you pick?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A few images, no extra tools: <strong>method 1<\/strong>.<\/li>\n\n<li>Developer, new uploads only, fine without a fallback: <strong>method 2<\/strong>.<\/li>\n\n<li>Click-to-configure, new uploads only, free: <strong>method 3<\/strong>.<\/li>\n\n<li>The simplest, quickest and best way overall: <strong>method 4<\/strong>. It covers your whole library, AVIF too, puts no strain on your server, leaves originals untouched and has nothing to regenerate.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">WebP has wide support. <a href=\"https:\/\/caniuse.com\/webp\">Can I use<\/a> puts it at about 97% of browsers in use. AVIF is usually smaller still. If you're wondering whether to go further, read <a href=\"https:\/\/infiniteuploads.com\/blog\/avif-vs-webp-wordpress\/\">AVIF vs WebP for WordPress<\/a>. And if you want the backstory on our setup, <a href=\"https:\/\/infiniteuploads.com\/blog\/infinite-uploads-now-optimizes-your-images-to-avif-and-webp\/\">here's when Infinite Uploads started serving AVIF and WebP<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Convert once, check the Content-Type, and stop shipping JPEGs nobody asked for.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Four ways to convert images to WebP in WordPress: before you upload, with a core filter, with a free plugin, or automatically on delivery. Plus how to check it worked.<\/p>\n","protected":false},"author":3787,"featured_media":14929,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"wds_primary_category":14,"footnotes":""},"categories":[26,14],"tags":[174,119,28,23,173],"class_list":["post-12304","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance","category-tutorials","tag-avif","tag-images","tag-optimization","tag-performance","tag-webp"],"acf":[],"_links":{"self":[{"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/posts\/12304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/users\/3787"}],"replies":[{"embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/comments?post=12304"}],"version-history":[{"count":6,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/posts\/12304\/revisions"}],"predecessor-version":[{"id":14927,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/posts\/12304\/revisions\/14927"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/media\/14929"}],"wp:attachment":[{"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/media?parent=12304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/categories?post=12304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/tags?post=12304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}