Magento 2 WebP Image support would help you add WebP images directly to the admin panel. But Magento doesn't support WebP directly. 

In this guide, you'll learn why. But let's start with the basics.

What is WebP?

WebP is a modern file format created by Google and supported by a variety of browsers. This file is known for being smaller in size than regular PNG, JPEG, or GIF files. That's why it becomes more popular across eCommerce websites, Magento in particular.

Since you may treat WebP as another image conversion method, you would most likely want to convert your images and add WebP file to Magento directly. 

But there is something you should know.

Does Magento Support WebP Images?

No. Magento does not support WebP images directly uploaded to the admin panel.  If you try add images in WebP format to Magento, you will get the Disallowed file type error, and the file won't upload. 

Magento Disallowed File Type

At this stage, you might be confused as to why Magento doesn't allow you to upload WebP images to the admin. But it actually benefits you.

Do You Need Magento to Support WebP?

Magento doesn't support adding WebP images directly to the admin to avoid a bad user experience. While WebP is supported by a lot of browsers, some older versions of them provide partial or no WebP support.

So imagine people coming from those browsers that don't support WebP. Instead of beautiful and high-quality images, they see nothing and are forced to leave irritated. Magento prevents that.

Brocken Images in Magento 2

How to Add WebP Support to Magento?

Perhaps Magento will start supporting WebP once 100% of browsers are fully compatible with the WebP format.

But for now, you should add WebP support yourself using one of two methods. Both include  Magento 2 WebP Extension

Add WebP images to the admin

Once you install the Magefan WebP Images Extension, it enables WebP support automatically. It means you can upload WebP images directly to the admin. 

Upload WebP Images in Magento 2

Example of WebP images added to Magento admin through Magefan WebP

Note: once you upload a WebP image, only this format will be visible on the frontend. So, if someone from non-WebP browsers comes to your store, they won't see any images.

That's what Magento initially wants to prevent. So consider automatic conversion.

Convert image to WebP automatically

Automatic WebP conversion gives you more control over quality, the number of images that are converted, and updates.

Magefan WebP tool comes with 4 different conversion methods. Choose one that works best for you (we suggest page load & cron) and let Magefan do the rest. 

magento 2 webp images metrics

A graph that shows images converted to WebP through different methods

Note: if you want to change the image quality to reduce the size even more at some point, just clear the WebP cache and start over. 

No need to reupload WebP copies over and over again. Just generate WebP images in Magento automatically.