In the current version, you can’t upload WEBP images on WordPress website without a plugin. But first of all, you have to convert the JPEG/JPG/PNG images to WEBP format. Stick to the end of the page and I will let you know everything about how you can convert the images and upload without plugins very easily.

WEBP is a next-gen image format whose normal size is approximately 34% smaller than all the other formats of images, and the best thing is that quality also doesn’t decrease. Click here to read more about it.

If you own a website and want to rank then a fast website is compulsory these days, in order to improve the speed you can use the images with the WEBP file format. As it is smaller in size, high in quality and also load faster.

Note: A news is coming that WordPress v5.8 will support WEBP images without any plugin or code. If it is coming then you will be able to upload directly with no modification in code or by using any plugin.

Benefits Of Using WEBP Images

  • High in quality
  • Smaller in size than PNG/JPG
  • Load faster by serving small bytes
  • Save bandwidth by serving small bytes

How To Upload WEBP Images In WordPress Without Plugin?

Step 1: Go to WEBP Converter > Upload JPG/PNG Image > Set quality (1-100)
Step 2: Log in to WordPress Dashboard
Step 3: Navigate to Appearance > Theme Editor > functions.php
Step 4: Paste the below code at the end > Update file

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

Step 5: Now try uploading WEBP images
That’s All

Wrap Up

I hope this article would be useful for you to know How To Upload WEBP Images In WordPress Without Plugin? At present, there are some browser and devices that don’t support WEBP images but by their developers are modifying their code so that it can also support. If you have any query make sure to drop them in the comments below or help us by sharing this article on social media.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.