FOLLOW ON GOOGLE NEWS
Upload a webp format image in WordPress without any plugin

How to Upload a webp format image in WordPress without any plugin?

Hello Guys, I am Vinay, in today’s blog, I will tell you how you can upload webp images on your WordPress website without any plugin.

So friends,

as you know that you cannot upload webp images to your website without the help of a plugin,

but I have a way for you, with the help of which you will be able to upload webp images without any plugin.

How do WEBP images impact your website’s SEO?

Whether utilising WebP photos on your website is a good idea or not hasn’t been formally approved by Google yet.
However, Page Speed Insights, the tool it uses to analyse website speed, advises you to utilise WebP pictures on your page.

However, employing WebP photos on your website has several unintended SEO advantages.
First off, compared to other picture formats, it has a smaller file size, making it easier for your website to load quickly.

Additionally, lossless WebP photos preserve image quality, which enhances your website’s UI (User Interface) and UX (User Experience).

So let’s start, we will do this process step-wise.

If you are new to white hat blogs then you can bookmark my blog page,

because I keep bringing you similar knowledge full blogs.

First of all, you have to open the admin section of your WordPress website.

Step-1

After that, you have to go to the “Appearance” section of your website.

Step-2

After opening the Appearance section, you will get the option of Theme File Editor inside it

image1
image2
image3
How to Upload a webp format image in WordPress without any plugin? 32

Step-3

After opening the theme file editor, on the right side, you will see the files of your theme,

out of which you have to open “function.php”

To upload a webp image to your blog, first of all, you have to copy the code given below, with the help of which you will be able to upload the image to your WordPress website without any plugin

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 type
 return $existing_mimes;
 }
 add_filter( 'mime_types', 'webp_upload_mimes' );
 //** * 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);
image4
How to Upload a webp format image in WordPress without any plugin? 33

By copying this code, upload it to your function.php file and save it
And after saving refresh your website once

After this, you will be able to upload webp images on your website without any plugin

JPG, PNG, and WebP Size Comparison. Is WebP better than JPEG?

.WebP.JPG/JPEG.png
WebP is an emerging image format that was created in 2010 and is currently being developed by Google, based on technology acquired with the purchase of On2 Technologies. When referring to JPG, you might also associate it with JPEG. Essentially, they are the same thing. JPG (Joint Photographic Expert Group) is a commonly used method of lossy compression for images, particularly for those produced by digital photography. PNG (Portable Network Graphics) is a raster-graphics format that supports lossless compression. It was developed as an alternative to the popular GIF format. PNG supports palette-based images (8bit, 24bit or 32bit), grayscale images, and full-colour non-palette-based RGB or RGBA images.
Smaller file size at an equivalent quality compared to PNG and JPEG. WebP lossless format can compress images up to 26% more compared to PNG while WebP lossy images are 25-34% smaller in size at an equivalent quality compared to JPG.It supports 24bit colour with up to 16 million colours.
Compared with PNG and WebP, JPEG works particularly well for large, complex, and colourful images with high resolution and lots of gradients.
The main advantage of PNG over JPG is the lossless compression, which means there is no loss in quality each time you open and save again.
PNG supports a large number of colours. PNG8 supports 256 colours and PNG24 supports over 16 million colours.
comparison between webp , jpg and png images

How do I open a WebP image?

Go to the WebP file you want to open. Double-click on the file. It will automatically open with Google Chrome.