WebP images not rendering on the front-end

Created on 28 May 2019, over 5 years ago
Updated 30 December 2023, 11 months ago

I have installed this module on the local environment and found the following issues with this:
1. The "Webp Support" checkbox with the field settings doesn't stay checked even after saving the "Manage Display" settings for a content type.
2. I have managed to generate the webp images but the images are not rendering on the front-end using the default field rendering of Drupal.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India anuragsharmam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States dmundra Eugene, OR

    I don't believe the patch from https://www.drupal.org/project/imagewebp/issues/3057526#comment-14056426 🐛 WebP images not rendering on the front-end Fixed has made it into the dev version. I think maybe a new issue to incorporate it and then test it might be good or this issue can be reopened as well.

  • 🇺🇸United States cpa2client

    same issue here, webp files generate but are not shown on front end. I use boost cache on this site.

  • 🇭🇺Hungary danyg Budapest

    Hi there, well the patch was written 2 years ago and we have updated releases on this module since then.
    I haven't checked the latest one yet, but I'm planning it - hopefully - soon.
    @cpa2client in https://www.drupal.org/project/imagewebp/issues/3057526#comment-14072706 🐛 WebP images not rendering on the front-end Fixed I added the trick to override the theme_image implementation in your theme, is it possible that this is missing from your code and does it lead to your issue at the front-end?

  • 🇭🇺Hungary danyg Budapest

    @cpa2client with the latest stable release we don't need to override the theme_image in the theme's template.php. Boost shouldn't have an effect on rendering. Can you add more details about your problem?

    @dmundra I can confirm that the patch was merged and the current stable release (7.x-1.2) contains most part of it. Can you add more details about your issue?

    I added a patch for Views integration for the most common Image formatter, so if it came from Views pages, you can give it a chance.

  • 🇺🇸United States dmundra Eugene, OR

    @danyg you are right. I will submit a new issue of what I was running into and it is mostly to do with private files.

  • 🇮🇷Iran Mehrdad201

    Hi all friends

    I used patch from comment #20 (in top of comments).

    I applied it on both .dev and 7.x-1.2 versions. php is 5.6.

    In both cases, I faced bug

    Fatal error: Call to undefined function _imagewebp_get_affected_images() in 
    

    it seems function _imagewebp_get_affected_images not exists.

    what can I do?

  • 🇭🇺Hungary danyg Budapest

    @Mehrdad201 you don't need to patch the v1.2 release with thi patch. The mentioned patch had been created in 2021 and the latest stable release uses a different approach and you don't need to use this patch. I would strongly recommend to upgrade your PHP at least to 7.4 if you have chance to do this. That will make a big performance impact, I believe.

Production build 0.71.5 2024