A Alumio vivid purple arrow pointing to the right, a visual representation of how to access more page material when clicking on it.
Go back

WebP images in WordPress

By
Published on
May 28, 2023
Updated on
June 24, 2026
IN CONVERSATION WITH
Email icon
Email icon

In today's digital world, having a fast-loading and visually appealing website is crucial for maintaining a positive user experience. One way to achieve this is by using WebP images in your WordPress site. WebP is a modern image format that provides superior compression and quality compared to traditional formats like JPEG and PNG. In this article, we'll guide you through the process of using WebP images in WordPress, helping you reduce image file size by up to 35% and improve your website's performance.

Understanding WebP Images and Their Benefits

WebP is an image format developed by Google that offers both lossy and lossless compression. It has been designed to provide smaller file sizes without compromising on image quality, making it an ideal choice for web usage.

Key benefits of WebP images:

  • Smaller file sizes: WebP images can be up to 35% smaller than their JPEG and PNG counterparts, resulting in faster loading times and reduced bandwidth usage.
  • High-quality visuals: Despite their smaller file sizes, WebP images maintain excellent image quality.
  • Wide browser support: Most modern web browsers, including Chrome, Firefox, and Edge, support WebP images.

How to Convert Your Images to WebP Format

Before you can start using WebP images on your WordPress site, you'll need to convert your existing images to the WebP format. There are several tools and plugins available for this purpose, including:

  1. Online conversion tools: Websites like Squoosh and WebP Converter allow you to upload and convert images to WebP format directly in your browser.
  2. Desktop applications: Programs like XnConvert and ImageMagick can be used to batch convert images on your computer.
  3. WordPress' plugins: Plugins like WebP Express and Imagify can automate the conversion process and serve WebP images directly from your WordPress site.

Serving WebP Images in WordPress

Once you've converted your images to WebP format, you'll need to set up your WordPress site to serve these images to your visitors. There are several methods to achieve this, including:

Using a WordPress plugin

Several WordPress plugins can help you serve WebP images on your website. These plugins usually provide a simple interface to configure WebP settings and automate the process of serving WebP images to compatible browsers. Some popular options include:

Handling WebP Images in Your WordPress Theme

To get the most out of WebP images, you'll want to ensure that your WordPress theme supports them. Many modern themes already include built-in support for WebP images. If your theme doesn't, you can add support by following these steps:

  1. Locate your theme's `functions.php` file, which can be found in the `/wp-content/themes/your-theme/` directory.
  2. Check for the following code snippet in your `functions.php` file:

function webp_upload_mimes($existing_mimes) {

  $existing_mimes['webp'] = 'image/webp';

  return $existing_mimes;

}

add_filter('upload_mimes', 'webp_upload_mimes');

  1. Save the changes and refresh your website. You should now be able to upload WebP images through the WordPress media library.

Testing Your WebP Implementation

After setting up WebP images on your WordPress site, it's essential to test your implementation to ensure that everything is working correctly. Here are a few ways to do this:

  • Use browser developer tools: Open your website in a browser like Chrome or Firefox, and use the developer tools to inspect the images on your site. If WebP images are being served correctly, you'll see the .webp file extension in the Image tab.
  • Test your site speed: Use tools like Google PageSpeed Insights or GTmetrix to analyze your site's performance. If WebP images are working correctly, you should see an improvement in your site's loading speed.
  • Check for browser compatibility: Test your website in multiple browsers to ensure that WebP images are being served to compatible browsers and fallback images are being provided for unsupported browsers.

By following this guide, you'll be well on your way to harnessing the power of WebP images in your WordPress site. Not only will your website benefit from faster loading times and reduced bandwidth usage, but your visitors will also enjoy a more seamless browsing experience.

At Alumio, we understand the importance of leveraging the latest technology to improve your website's performance. Our team of experts can help you with flexible WordPress integration solutions, comprehensive project support, and software implementation, ensuring your online presence is optimized for success.

Turn AI ambition into action

Portrait of Leonie Becher Merli, Business Development Manager at Alumio

Get a free assessment of your integration needs and next steps

Portrait of Leonie Becher Merli, Business Development Manager at Alumio

No items found.
Topics in this blog:
No items found.

FAQ

Integration Platform-ipaas-slider-right
What is WebP and why is it better than JPEG or PNG for WordPress?

WebP is a modern image format developed by Google that provides better compression than JPEG and PNG while maintaining comparable visual quality. WebP lossless images are typically 26 percent smaller than PNGs; lossy WebP images are around 25 to 34 percent smaller than JPEGs at equivalent quality. Smaller image files mean faster page load times, lower bandwidth consumption, and better Core Web Vitals scores, particularly Largest Contentful Paint, which is directly affected by image load performance.

Integration Platform-ipaas-slider-right
How do you convert images to WebP in WordPress?

The easiest way to use WebP in WordPress is through an image optimization plugin that converts and serves WebP automatically. ShortPixel, Imagify, and WebP Converter for Media convert uploaded images to WebP and serve them to browsers that support the format (all modern browsers) while keeping the original JPEG or PNG as a fallback. Plugins that handle serving via the picture element or WordPress's native srcset are more reliable than those using .htaccess rewrite rules for WebP delivery.

Integration Platform-ipaas-slider-right
Does WordPress natively support WebP images?

Yes. Since WordPress 5.8, WebP is a supported upload format, meaning you can upload WebP files directly to the Media Library and use them like any other image. WordPress also generates responsive image variants (srcset) from WebP uploads. However, WordPress does not automatically convert existing JPEG and PNG images to WebP on upload; for automatic conversion, an image optimization plugin is still needed.

Integration Platform-ipaas-slider-right
How does using WebP images improve WordPress Core Web Vitals?

WebP's smaller file sizes directly improve Largest Contentful Paint (LCP) by reducing the time needed to download the page's largest visible image element. Faster image delivery also improves overall page load speed. For sites where images are a significant portion of page weight, such as e-commerce product pages or blogs with large featured images, switching from JPEG/PNG to WebP can meaningfully move LCP into Google's Good range without other changes to the page.

Integration Platform-ipaas-slider-right
What browser support exists for WebP?

WebP is supported by all major modern browsers: Chrome, Firefox, Safari (since version 14), Edge, and Opera. Browser support now covers the vast majority of web traffic, making it safe to serve WebP as the primary image format for most WordPress sites. For the small percentage of users on older browsers without WebP support, the picture element with a JPEG or PNG fallback ensures compatibility. Image optimization plugins typically handle this fallback automatically.

Integration Platform-ipaas-slider-right
Should you use WebP for all images on a WordPress site?

WebP is the right format for most photographic and complex images. The exception is simple graphics with flat colors, transparency, or logos with crisp lines, where SVG is the better format (infinitely scalable, very small file size). For animated images, WebP supports animation but AVIF may offer better compression depending on browser support requirements. A practical approach is to use WebP for all photographic content and SVG for icons and logos.

Get a free assessment of your integration needs

Laptop screen displaying the Alumio iPaaS dashboard, alongside pop-up windows for generating cron expressions, selecting labels and route overview.