How to upload WebP image in WordPress without plugin with complete guidance and explained in a simple way in a step by step.
For Uploading WebP require code snippets, which help in uploading smoothly. You can only upload
WebP by adding the code. The code is given below. This code is helpful for adding the image manually.
Complete Guide for how to upload WebP image in WordPress without plugin.
To make the uploading of WebP Image easy and error-free as like uploading of JPEG, PNG.Use the below code in the Function.php file. You will get this file in Theme Editor Section.
Steps to Add the below code.
- After login to WordPress Admin, on the left hand side of the you will Navigation Menu.
- In the Navigation Menu you will get “Appearance”.
- Inside Appearance you will find the sub menu Theme Editor at the bottom.
- Just click the Theme Editor.
- Once the Theme Editor Open on the Right Hand Side you different file link.
- In the File link You will file Function.
- Open that file and the code to bottom of file and the save it.
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');
After adding this code you can use the below link to convert the WebP image.
How to use WebP images in WordPress
With help of the below link first, you have to convert jpg, png images into WebP images. Then your next step after converting add the images into your post as you upload the normal jpeg, png images.
Note: Add the Webp images after adding the code snippets given above.
Below are helpful links where you can convert WebP Image
Best WordPress WebP Plugin
The Best WordPress plugin for converting WebP images is called “WebP Converter for Media”.
You can add this plugin, after going into the plugin section. In the plugin section, you will find out to add a new button on the top. After clicking on top you will find.
WebP Converter for Media
WebP Converter for Media is one of the best plugins for WordPress, In Which all images can be converted in one click. This tool uses WordPress REST API to download all images addresses and convert all files slowly. This process can take several minutes or longer depending on how many files you have. Please do not close your browser during this process.
After installing the plugin, this operation should only be done once. The Media Library will automatically convert any new images.
How does WebP Converter for Media works
Images can be added to your media library and automatically converted and saved in separate directories. Images are converted with the native PHP extension GD or Imagick.
The server checks if the browser can download an image file. If all is fine, the browser will be able to download the equivalent image in WebP format.
The default loading mode plugin (via.htaccess), does not alter file URLs. This means that saving the page to the cache is possible without any problems and page generation times do not increase.
Modifying image URLs is done using mod_rewrite, which is a module on the server. This allows us to use friendly links in WordPress. The MIME type of the file sent is also changed to image/WebP.
WebP pros and cons
Pros
- WebP Images are smaller in file size
- It improves the compression algorithm
- It is good in smoother colour gradations
Cons
- Browser support for WebP is weaker
- Exporting Interface is poor
- Plastic Appearance in case of artifacting
Hey there!In Healthotips Website, Some Pages Include Affiliate link. And If you click on this link, I get some commision And Also Include Images on this site used from Amazon and Pixabay.com