Default webp convertor fail for many images resulting in blank file

I have noticed that default webp convertor doesn’t work properly , many of the images are converted but with nothing on it, they are empty. Check this 2 images, original and the webp result

CeasSmartwatchSport164GBMemorieESLbyEssentialLevelApelBluetoothHD400400FullScreenTouchNotificariApel-5806392-3

Bellow is the empty file, you can seer it because its empty, just right click on it to save :

CeasSmartwatchSport164GBMemorieESLbyEssentialLevelApelBluetoothHD400400FullScreenTouchNotificariApel-5806392-3.jpeg

Hi!

If you are using the imagick image resizing library, try switching to gd or vice versa. Then delete the thumbnails and check if it works.

How webp conversion process works ? Once enabled it will start converting all images in a queue ? I don’t understand why once enabled I’m getting blank images on all products.

It will change the extension in the filename of the thumbnail that needs to be accessed. And if there is no thumbnail with that filename, it will create a new one in the selected format.

Have you tried changing the library?

No I don’t because it seems related to image name somehow, some photos are converted just fine from the same vendor import feed, some not… I also don’t know how to change the library as I use default Debian 11 imagick. imagick needs to be installed on each php version on server, I dont really know how to disable imagick and enable GD, I tried to reinstall imagick and all websites fail in error , I had to restore the whole server from a backup snapshot.

It’s much easier than you describe :slight_smile:
Just change the library in the image_resize_lib tweak in config.local.php. Just make sure that the one you change is installed on your server.

Right now its

 'image_resize_lib' => 'auto', // library to resize images - "auto", "gd" or "imagick"

I should make it like this ?

 'image_resize_lib' => 'gd', // library to resize images - "auto", "gd" or "imagick"

Try both gd and imagick, one by one. Please clear the generated thumbnails after you make changes to this tweak.

Let me know if it helps.