Skip to main content

Images disappear after update

More
1 hour 36 minutes ago #100000383 by marcw
-- HikaShop version -- : 6.7.1
-- Joomla version -- : 5.4.10
-- PHP version -- : 8.3.36
-- Browser(s) name and version -- : Chrome 156.0

Hello,
After the update, no images, no .webp, no .avif. If I turn off generating .webp and .avif, images appear. If I delete the thumbnail directory, then turn on .webp, images appear. If I turn on .avif, nothing appears until I turn off .avif. Names in the thumbnail have extensions: .png, _png.webp .phg.webp .png.avif  if I turn off .webp or .avif and turn back on .webp then get .png.webp.webp and same for .avif .etc.  

Also, when .avif generation is on and no images appear on image inspection:
<picture><source srcset="/images/com_hikashop/upload/thumbnails/100x100f/wordstudyOT.png.avif 1x, /images/com_hikashop/upload/thumbnails/200x200f/wordstudyOT.png.avif 2x" type="image/avif"><source srcset="/images/com_hikashop/upload/thumbnails/100x100f/wordstudyOT.png.webp 1x, /images/com_hikashop/upload/thumbnails/200x200f/wordstudyOT.png.webp 2x" type="image/webp"><img src="/images/com_hikashop/upload/thumbnails/100x100f/wordstudyOT.png" srcset="/images/com_hikashop/upload/thumbnails/100x100f/wordstudyOT.png 1x, /images/com_hikashop/upload/thumbnails/200x200f/wordstudyOT.png 2x" class="hikashop_product_listing_image" alt="Complete Word Study Old Testament" title="Complete Word Study Old Testament" width="100" height="100" loading="lazy" decoding="async"></picture>

I found plugin:  System - DJ-WebP which I disabled but no effect so I left it unpublished, please advise.

The page is currently working with .webp turned on but if .avif is turned on it fails like above. 

I also applied the fix from:  Products down after update  

Please help,
Marc

Please Log in or Create an account to join the conversation.

More
Just now #100000384 by nicolas
Hi,

The images disappear because your server refuses to deliver the .avif files. On your site, any address ending in .avif under images/com_hikashop/upload/ answers "403 Forbidden", whether the file exists or not, while .png, .jpg, .gif and .webp files are served normally (.svg, .txt and .pdf are refused there too). So the folder is protected by a rule that only allows a list of file extensions, and avif is not in that list. HikaShop creates the .avif files correctly, but Chrome supports AVIF, so it picks the AVIF version first. When that request is refused, the browser does not fall back to the WebP or PNG version, and the image stays empty. That is why everything shows as soon as AVIF is turned off.

This rule does not come from HikaShop: the .htaccess file HikaShop puts in its upload folder only blocks scripts (php, cgi and the like). Look at the .htaccess file in images/com_hikashop/upload/ (and images/com_hikashop/upload/thumbnails/) for a FilesMatch or RewriteRule listing allowed extensions such as jpg|jpeg|png|gif|webp, and add avif to it. If there is no such file, the rule comes from a security extension (Admin Tools, RSFirewall and the like, where the allowed file types for the images folders are set) or from your host's server configuration. You can check the result by opening believer.com/images/com_hikashop/upload/...wordstudyOT.png.avif in your browser: it should show the image instead of a Forbidden page. Until then, leave the "Generate AVIF images" option off; WebP alone works on your site, as you saw. The option is described here: www.hikashop.com/support/documentation/54-hikashop-config.html

About the file names: since 6.7.1, the WebP and AVIF copies are named after the whole image name (wordstudyOT.png.webp, wordstudyOT.png.avif), so that two images with the same name and different extensions no longer share the same copy. The older copies (wordstudyOT.webp) are simply not used anymore. HikaShop never creates names like .png.webp.webp, so those come from another extension that converts images (DJ-WebP does this kind of conversion). Leaving it unpublished is fine, since HikaShop already makes its own WebP and AVIF copies. Once avif is allowed on your server, you can delete the images/com_hikashop/upload/thumbnails folder once to get rid of the leftover files: HikaShop recreates the thumbnails and their WebP and AVIF copies the next time the pages are displayed.

Please Log in or Create an account to join the conversation.

Time to create page: 0.096 seconds
Powered by Kunena Forum