png img vs webp img

Timemaker07

Newbie
Joined
Nov 23, 2022
Messages
24
Reaction score
10
Hi guys, happy new year.
I'm building a new website, and i have thounds of png images. Should i make them to webp before i upload them to website?
 
If you are using Wordpress, then just upload them as they are in png or jpg.

Then use a plugin like Imagify which will optimize them for file size and can also change them to webp if required.
 
If your site doesn't have automatic image optimisation and your png's are over 200kb, maybe you should, for faster loading and technical SEO.
 

PNG

Provides high-quality images without any loss of detail, making it suitable for images with sharp edges, transparency, and text.

WebP

Offers good image quality, and the lossy compression option allows for smaller file sizes while maintaining acceptable visual quality.
 
Upload them as PNGs.

Use a plugin to compress and convert them to WebP. I personally use Super Smush, but there are a ton of options.

You don't want to upload them as WebP to the site, as not all browsers support that format yet. Roughly around 4% of internet users still use a browser that doesn't support WebP.

Uploading them as PNG allows for a fallback to those 4%.
 
If you are using Wordpress, then just upload them as they are in png or jpg.

Then use a plugin like Imagify which will optimize them for file size and can also change them to webp if required.
It works, thanks a lot, bro
 
Upload them as PNGs.

Use a plugin to compress and convert them to WebP. I personally use Super Smush, but there are a ton of options.

You don't want to upload them as WebP to the site, as not all browsers support that format yet. Roughly around 4% of internet users still use a browser that doesn't support WebP.

Uploading them as PNG allows for a fallback to those 4%.
Thank you bro, i will upload PNG images and use a plugin.
 
I have no luck, actual wp version, plugins are updated have PHP version 8.2.
Added htaccess rules to convert images to webp and add a webp plugin, then upload an image to a new post, nothing chaged.
Check the page with browser right click inspector rool- all images are same in png or jkpg not in webp.

In inspecttor tool the image showed as resized, but in google insight it shows not resized .....what's wrong here with the endless wordpress construction looop ....?

No matter which plugin I use my images not convert to webp. Have a neve theme with card block demo content , may be the card block is the issue ?
What is wrong ? Must I activate an PHP extension in cpanel or something ?

Now added this code to themes function.php= no luck nothing changed

function add_custom_upload_mimes( $mimes_types ) {
$mimes_types['webp'] = 'image/webp'; // webp files
return $mimes_types;
}
add_filter( 'upload_mimes', 'add_custom_upload_mimes' );

function add_allow_upload_extension_exception( $types, $file, $filename, $mimes ) {
// Do basic extension validation and MIME mapping
$wp_filetype = wp_check_filetype( $filename, $mimes );
$ext = $wp_filetype['ext'];
$type = $wp_filetype['type'];
if( in_array( $ext, array( 'webp' ) ) ) { // if follows webp files have
$types['ext'] = $ext;
$types['type'] = $type;
}
return $types;
}
add_filter( 'wp_check_filetype_and_ext', 'add_allow_upload_extension_exception', 99, 4 );



function displayable_image_webp( $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', 'displayable_image_webp', 10, 2 );

Any tips ?
 
Last edited:
If you want to do this for technical reasons, go ahead. If you think it will benefit you in terms of SEO, I can guarantee you that it will not benefit you at all. Additionally, the WebP format is not supported on some older versions of iOS devices, which could result in a loss of users.
 
If you want to do this for technical reasons, go ahead. If you think it will benefit you in terms of SEO, I can guarantee you that it will not benefit you at all. Additionally, the WebP format is not supported on some older versions of iOS devices, which could result in a loss of users.
As he mentioned, You can use WebP format you will get fastest loading speed which gets you an good user experience. But it might not be compatible with all web browsers, if it is not supported you will lose users.
 
Back
Top