Upload WebP Images In WordPress

Today I will tell you How To Upload WebP Images In WordPress Because in WordPress, you are not given such features as you can directly upload images of Webp format to your WordPress and use it in your articles on anyone.

So today I am going to give you the solution of the same thing that in which way you will upload the images.

More Questions About WordPress

  1. Free WordPress Hosting On AWS
  2. Free SSL Certificate On WordPress
  3. Upload WebP Images In WordPress
  4. Free Web Hosting With Cpanel Every Thing Free.
  5. WordPress Account Without Password

Why I am Using Webp Images in WordPress?

Similar picture quality like JPG and PNG but comes with the lowest image size of them all.
According to a study by Google on WebP images:
25-34% less image size than comparable JPEG images.
26% smaller size than PNG images.
Great for compression purposes.
One drawback of this image format is that it is still not supported by 9% of browsers across the world.

Upload WebP Images In WordPress

Upload WebP Images WordPress 2021

First of all, you have to do some updates in WordPress, for which you have to come to the DES board of your WordPress and then go to the Appearance section and click on Theme Editor so that I can edit something that you had installed in WordPress.

Upload WebP Images WordPress 2021

After doing this a file will open in front of you where a lot of code will be written. You do not have to change anything here and select the function.php file from the menu bar in the right corner so that you can see and edit all the functions being used in the team.

Code For WebP Images – Upload WebP Images In WordPress

After doing this you have to copy the code given below. By which you will add the function of uploading images of Webp format to your WordPress theme. By this only you will be able to upload Webp images in your WordPress.

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' );

This method is the easiest and you will be able to easily upload Webp format images to your WordPress without using any plugin.

Upload WebP Images WordPress 2021

You have to paste the copied code at the end of the function.php file so that you can remember later where you got the code tested. If there is any problem with your WordPress, then you can easily remove the pasted code and make your WordPress back as before. After doing this, you have to click on the update file button given below so that the editing done by you is saved.

After doing this, now you have to check whether the images of Webp format are being uploaded successfully in your WordPress or otherwise, first you have to go to the media and then click on the add new button like you Be able to add any media file to your WordPress.

After doing this, you will see an interface like this, whereby clicking on the select file, you can select your Webp format image and upload it successfully as you see in the photo. You can edit the uploaded photo later which features are given to you after the loudest upload.