Do you want to know how to upload webp image in WordPress?

Hey guys do you know you can improve your WordPress website loading times by serving webp image files? WebP is a next-generation image file type developed by Google.

By serving webp images in WordPress websites you can speed up loading time which will improve your website ranking in SERP.

Do you know Google also recommend using webp image files to improve website loading time?

Also Read: How to remove date from WordPress URL easily in 2021

Today in this article I will share a full step by step guide on how to upload webp images in WordPress easily in 2022. I will also share how you can convert to webp file format already upload images in WordPress library and what are the pros & cons of using webp image files in WordPress. So read this article carefully till end and serve webp image in WordPress to improve your website loading time.

What is webp image?

WebP is a modern image format that provides superior lossless and lossy compression for image on the web. According to Google developer webp lossless images are 26% smaller in size as compared to PNGs and 25-34% smaller compared to JPEG image. WebP image files are 25-34% smaller in size compared to JPEG, PNG, GIF but maintain quality.

Generally when we compress images, it losses quality but in the case of webp you can compress images without losing quality.

WebP image is developed by Google, it is designed to create files that are smaller in size for the same quality of PNG, JPEG and GIF image format. You can convert JPEG, PNG and GIF files to webp format without losing quality, which will be 25-34% smaller in size.

The webp image format was first announced in September 2010 and it’s stable version was released in 30 January 2021. WebP image format is supported by 96% of the web browser in the world as of December 2021.

Since webp images are smaller in size it loads faster than PNGs which ultimately help webmasters to load website fast. WebP is a next-generation image format but it’s new to people. Webmasters started using webp image files heavily after its stable release on 30 January 2021.

Currently, many popular giants like Twitter and Safari are not supporting webp image format which can be a headache for some webmasters. Even though WordPress was not supporting direct upload of webp image files till 5.8.2 update in June 2021.

Also Read: How to start a successful money-making blog in 2021

How WebP works?

WebP images are up to 34% smaller in size without losing quality as compared to PNG.

Lossless webP compression uses already seen image fragments in order to exactly reconstruct new pixels. It can also use a local palette if no interesting match is found.

A WebP file consists of VP8 or VP8L image data, and a container based on RIFF. You can learn more about the Compression Techniques of WebP here.

How to convert image to webP in 2022

If you want to upload and serve webP images in your website, you have to first convert your normal image files to WebP image files.

It is very easy to convert PNG and JPEG image files to WebP, you can use any Application for this. Many websites are also providing image conversion service that allows you to convert your PNG, JPEG image to WebP online very quickly & easily.

Below I have added a list of image converter websites you can use to convert images to WebP.

  • https://image.online-convert.com/convert-to-webp
  • https://cloudconvert.com/webp-converter
  • https://webp-converter.com/
  • https://ezgif.com/jpg-to-webp
  • https://convertio.co/jpg-webp/
  • https://www.freeconvert.com/webp-converter
  • https://www.xconvert.com/convert-jpg-to-webp

Which browser support WebP

WebP image file format is natively supported by Google Chrome, Opera, Edge, Internet Explorer, Firefox web browsers, many other tools and software libraries.

Safari browser also expanded its support in mid of 2021. Now in 2022 Safari browser users also can view your web page properly if you are using webP image format. Many other web browsers are expanding their support to webP every year.

Google Chrome, Edge & Firefox webp are used by 78% of internet users and they all support WebP, So you can upload webp image in WordPress website without worrying about a bad user experience.

Benefits of Using Webp images in WordPress

Top advantages of serving webp image on your website

  • Reduce site loading time
  • Keep high image quality
  • Save traffic

WebP image files are up to 34% smaller in size as compared to PNGs & JPEGs without loss of image quality. The WebP files are smaller, better-looking images that make the website fast. Sometimes if we use more images in a webpage it may take some more time to load and may create bad user experience. By serving WebP image in WordPress website you can reduce site loading time which will help you to save traffic. WebP image files are high-quality image files smaller in size compared to PNGs & JPEGs. Since WebP files are high-quality images it’s not an issue to serve these images on your website.

Disadvantages of using WebP images

Two main problems with WebP images are

  • Not supported by all web browser
  • Some social media & software don’t support webp
  • Not supported by all web hosting provider

Here you may ask, if webp image has these benefits then why does not everyone use it?

The answer is very simple, webp file format is not compatible with all web browser. Even some web hosting providers don’t support webp image format. And the WebP image is developed primarily by Google, some people think Google may create problems if they use Google-backed image file type, this is also a reason some people don’t use WebP image and criticise Google over promoting it.

Even WordPress core was not supporting WebP images for a long time, when you try to upload webp image in WordPress it shows ” Sorry this file type is not permitted for security reasons “

After 5.8 version update of WordPress in June 2021, the WordPress core also started supporting webp image files. Now you can upload image in WordPress directly without any plugin (If your web hosting provider support WebP image file type).

If you are using old versions of WordPress then don’t worry I have shared a step by step guide on how to upload webp image in WordPress, Follow these steps carefully and you can upload webp image in WordPress very easily in 2022.

Every year more web browsers ate expanding their support to webp image. Safari browser started supporting webp image in 2021. The majority of internet users use Google Chrome, Edge, Opera, Firefox and all of these web browsers natively support Webp image, So you can upload webp image in WordPress website without worrying about user experience.

Some social media like Twitter is not supporting WebP in December 2021. If you add WebP feature image to your blog post and share it on Twitter then please remember Twitter will not fetch the feature image.

Some tools like Canva is also do not support use of WebP images, when you try to upload webp image to Canva it shows an invalid file type.

How to upload Webp image in WordPress without Plugin

Below I have shared step by step guide on how to upload webp image in wordpress easily in 2022 without using a plugin. Just follow all steps and you can upload webp image in WordPress.

STEP 1: Log in to your WordPress dashboard (yoursitename/wp-admin)

STEP 2: Click on Appearance then click on Theme Editor (as seen in the image below).

Ho to upload webp image in wordpress without plugin

STEP 3: Click on functions.php and paste the below-given code

function webp_upload_mimes( $existing_mimes ) {// add webp to the list of mime types$existing_mimes['webp'] = 'image/webp';// return the array back to the function with our added mime typereturn $existing_mimes;}add_filter( 'mime_types', 'webp_upload_mimes' );
How to enable webp uploading in wordpress

After completing these steps you will be able to upload WebP image in WordPress very easily. Done, now you can normally upload webp images in WordPress like JPEG nad PNG.

But still, you can’t view WebP images on your WordPress media library means you can’t see a preview of uploaded Webp files from your WordPress media library. If you want to see a preview on WordPress media library then just put the below-given code inside functions.php

Add the below-given code to your theme functions (functions.php) to preview webp images on your WordPress media library

//** * Enable preview / thumbnail for webp image files.*/function webp_is_displayable($result, $path) { if ($result === false) { $displayable_image_types = array( IMAGETYPE_WEBP ); $info = @getimagesize( $path ); if (empty($info)) { $result = false; } elseif (!in_array($info[2], $displayable_image_types)) { $result = false; } else { $result = true; } } return $result;}add_filter('file_is_displayable_image', 'webp_is_displayable', 10, 2);

Done, now you can upload webp image in WordPress and preview them from media library.

Best WordPress plugin for converting image to WebP

When you want to upload webp image in WordPress on new posts, you may also need to know how to convert existing images to webp. To convert WordPress media library images to WebP you can use a WebP converter plugin, here I have added a top 5 best WordPress pluging to convert media library images to webp.

1. WebP Express: WebP Express plugin uses webp convert library to convert images to webp. You can use this plugin to convert your existing image files to webp and boost your site speed. The best thing about this plugin is it is completely free to use.

  • Price: Free
  • Active installations: More than 100000
  • Developer: Bjørn Rosell

2. ShortPixel Image Optimizer: ShortPixel Image Optimizer is easy to use, lightweight WordPress plugin to convert images to WebP very quickly. You can also use Short pixel image optimizer plugin to compress images and PDF files. The most advantage of this plugin is they provide frequent update.

  • Price: Free
  • Active installations: More than 300000
  • Developer: ShortPixel

3. Image optimization & Lazy Load by Optimole: Image optimization & Lazy Load by Optimole is a fully automated WordPress plugin that reduces the weight of your image. You can convert WordPress media library images to webp using this plugin.

  • Price: Free
  • Active installations: More than 80000
  • Developer: Optimole

4. WebP Converter for Media – Convert WebP & Optimize Images: WebP Converter for Media – Convert WebP & Optimize Images is a very useful WordPress plugin which converts your images from various formats to WebP. The most advantage of using this plugin is that the plugin does not change image URLs.

  • Price: Free
  • Active installations: More than 100000
  • Developer: Mateusz Gbiorczyk

5. Smush – Lazy Load Images, Optimize & Compress Images: Smush – Lazy Load Images, Optimize & Compress Images is a very useful WordPress plugin that allows you to customize, compress, lazy load and convert image to webp. Smush WordPress plugin is really helpful to boost your site speed.

  • Price: Free /starts at $70
  • Active installations: More than 1000000
  • Developer:  WPMU DEV
  1. How WebP helps you

    WebP images are actually smaller in size than their JPEG, PNG equivalents with the same quality. WebP images take less bandwidth to transmit. By serving WebP images you can reduce your site loading time and visitors to your website will see the complete page more quickly.

  2. Can I upload WebP images directly to WordPress

    Yes, after WordPress adds WebP support on the 5.8.2 update in June 2021 you can now directly upload webp image in WordPress.

  3. Does WordPress support WebP image

    Yes, after WordPress 5.8 version update in June 2021 you can use WebP images like you would a JPEG or PNG image. Your web hosting provider should support Webp image.

  4. How can I enable Webp support in WordPress

    After WordPress 5.8 update in June 2021 it officially supports webp image. But if you are using the previous version you can enable webp support in WordPress by adding a new MIME type or by using a plugin.

  5. How can I convert an image to WebP

    You can use any software to convert a normal image to WebP or you can use an image converter website to convert an image to WebP.

  6. Should you use WebP images on your website

    WebP images reduce your website loading time, take less bandwidth to load and are supported by major web browsers like Google Chrome, Firefox, Edge and Opera So you should use WebP images in your website.

Summary

In this article, I have shared how to upload webp image in WordPress without plugin, how to convert WordPress media library image to WebP and what are the pros & cons of using webp image.

Recently, WordPress started supporting webp image files after their 5.8 version update in JUne 2021. WebP file format is supported by many popular web browsers like Google Chrome, Firefox, Edge, Opera, Safari and more. Many internet users uses Google Chrome and it supports webp So it should not be a problem for you to serve WebP images on your WordPress website. But obviously if users open your site from a web browser that doesn’t support webp then the user can’t view your webpage properly.

And you should remember that currently in January 2022 Canva and Twitter does not support webp images. You can’t upload webp image files to Canva. If you write an article, use webp image and share it on Twitter then you should be aware of that Twitter will not fetch feature image of your blog post as they don’t support WebP image format.

Thank you for reading this article completely, I hope this was helpful for you to know how to upload WebP images in WordPress without using a plugin, how to convert normal image to WebP and what are the pros & cons of using WebP image in your website. Please share this blog post with friends, if you have any suggestions you can share them in a comment. You can join our Facebook group and Telegram group to discuss with other bloggers on Blogging, SEO, Affiliate Marketing and many online earning methods.