Hello Everyone,
I need to upload a webp file to magento 2. But I am getting an error when uploading. I'm adding the error image below. My client is adding a picture in .webp format. Because the picture is animated, its size is high. I converted it to webp format. WebP format for Magento is not possible? We will use for custom banner blocks. Thanks in advanced!
https://i.stack.imgur.com/1iKJa.jpg
There is no one in the big magento forum to answer this?
Yes, Magento 2 does not support WebP yet (the latest version now is 2.3.4). But what you can do is to upload regular png or jpg images and then use some tool to convert them to webp on the storefront.
Such a tool will be very useful as I think you already have a lot of JPG product images and do not looks like you would love to convert all them manually to the WebP.
To convert all images to WebP you can go with a few solutions:
1. Configure your webserver to do this
2. Use Cloudflare Polis service that optimizes images
3. Or simply install some Magento 2 extension that will do this for you.
I prefer the 3rd way. For our projects we use Magento 2 WebP Images extension and it does all work, e.g. automatically perform converting for all images, correctly display images in browsers that do not support webp.
MageComp's Magento 2 WebP Optimized Image Extension is the right solution. The best thing is that it can handle the Low size image upload with the same clarity output on the frontend
You can upload WebP images easily on your Magento 2 store. It improves your website performance.
Magento 2 does not natively support the WebP format for image uploads in its core functionality out of the box. This is likely why you're encountering an error when trying to upload a WebP image to your store. Below are detailed steps and potential solutions to address this issue:
1. Use WebP Support Extensions (Recommended)
The BSS Commerce Magento 2 Convert Images to WebP Extension is a solid choice for your needs. It’s designed to simplify the process of converting and serving WebP images on your Magento 2 store, and it has several features that make it a highly effective solution for your requirements. Here’s a breakdown of why this extension could be ideal for your scenario:
- Automatic WebP Conversion
- Supports Both WebP and Fallback Formats
- Optimized for Performance
- No Code Changes Required
Install here: Magento 2 Convert Image to WebP extension
2. Magento Development Service (Alternative Approach)
If you'd rather delegate the implementation or prefer a customized solution, you can opt for Magento development services. This would be ideal if:
- You need a highly tailored approach that fits into your specific store structure and requirements.
- You don't want to rely on third-party extensions.
BSS Commerce also offers Magento 2 development services and can help integrate WebP support with a custom solution.