Archived topic
Theme Niche width image Webp problem
7 replies · Started by Gerva on December 9, 2022
Morning to all
I am using Niche theme and I am encountering a problem with webp images.
Specifically the product images if they are jpg no problem they are displayed even with the hover effect.
Conversely if I use webp images only the main image appears but the gallery doesn't work. If the gallery image is jpg instead it does.
Also in the single product display the same problem, only images that are not webp
I left an example in the product "gioiello 01 and 02"
I wanted to report this and in case if there is a solution.
Thanks
Hi there,
how are the WebP images being generated ? Is that using a Plugin ?
Hello and thank you for your interest
No I generate them half Photoshop and then load them into the media library
Looking at the first product ie. Gioielli 01
The missing image links to this file:
https://shop.makamaga.com/wp-content/uploads/2019/06/gioielli-05-makamaga.webp
Which is empty. So that image is either corrupted or something else has gone wrong.
As a test, what happens if you add this PHP Snippet to your site?
add_action( 'init', function() {
add_image_size( 'shop_catalog', 400, 400, true );
});
This will ensure the correct size image is available for the secondary image
Hi
Yes indeed I checked, the Webp image on my PC can be seen fine, uploaded online this is not visible !!!
I tried with an online jpg/webp converter and uploaded the image this works.
It occurs to me that at this point my PhotoShop doesn't always convert Webp images to the best of its ability .... I will check further.
I will review all the images and see if everything turns out OK.
At this point I am sorry to have bothered you.
Regarding the proposed code, added apparently I see no difference on the frontend.
I will work on it today and report back in case.
Thank you very much for the kind assistance, you are number one
Glad to be of help.
Let us know if you find anything :)
Hi
I reviewed all the images and indeed PhotoShop Webp saving created the problem.
I updated the plugin and now everything works.
I'm sorry to have bothered you.
Thank you very much
Thanks for reporting back - i am sure others will find this of use :)