How to Upload WebP Files on WordPress?

How to Upload WebP Files on WordPress?

How to upload WebP Files on WordPress: You must have heard about jpg, jpeg, Png, gif format, but do you know about WebP image format. If you are a blogger, you can make a low-size, fast loading, quality image using this image format. Which will be better for the SEO of your blog, website.

What is WebP image Format?

WebP is a modern image format, which provides better loss, less and lossy compression for images on the web. This file format has been developed by Google, which can reduce the size of the image without losing image quality.

This mainly helps to create smaller, better-looking and more fast-loading images in the web. WebP reduce images are 26% smaller than PNG and WebP lossy images are 25-34% smaller than JPEG.

Note: Lossless means one can reduce the size of the image without any quality loss. Whereas with loss of image size in lossy image, the quality also suffers.

Here the webp extension is natively supported in Google chrome, Firefox, Edge, Opera browser, and many other tools and software.

How to upload WebP Files on WordPress?

You do not need any plugins to upload WebP images inside your WordPress website. Online has many image converter where you can convert jpg, jpeg, png image to webp format. Follow the steps given below to see its complete process.

Step 1: First of all go to the CloudConvert website.

How to Upload WebP Files on WordPress?

Step 2: Set extension of your image file here, JPG, JPEG or PNG. Now click on Select File, select image from computer or mobile and click on Convert button.

Step 3: Within a few seconds your image will be converted to webp extension, now download it.

Step 4: When you try to upload a webp file on WordPress, an error message appears: “Sorry, this file type is not allowed for security reasons”. Below I have explained how you can solve this problem.

How to Upload WebP Files on WordPress?

Step 5: It is very easy. All you have to do is add the below given code to the functions.php file. WordPress does not natively support viewing and uploading webp files, but it can work in a few simple steps.

Step 6: Go to Theme Editor under Appearance in your WordPress and paste the code below at the end of the functions.php file and click on Update File.

How to Upload WebP Files on WordPress?

//** *Enable to upload webp image.*/
function webp_upload_mimes($existing_mimes) {
    $existing_mimes['webp'] = 'image/webp';
    return $existing_mimes;
add_filter('mime_types', 'webp_upload_mimes');

But when you go to Media / Library, you cannot see the preview of the image.

Read More:

Hope you have liked the information given about the WebP image format. If you have any question related to it, you can ask us in the comments and share it on social media to support our work. | Get latest news 2022 & live updates from India, live India news headlines, breaking news India. Business, Lifestyle. World, Technology, Sports, Internet, Hosting, Blogging, Career, Astrology, Job, Entertainment News Read all latest India news & top news on India Today News.