Imagemagick with latest avif 1.1.1 breaks all images

Created on 27 September 2023, about 1 year ago
Updated 3 June 2024, 6 months ago

update form 1.1.0 to latest avif 1.1.1 breaks all images.

D9.5.11 with ImageMagick 7.1.1-15 Q16-HDRI x86_64 php 8.1

🐛 Bug report
Status

Closed: works as designed

Version

1.1

Component

Code

Created by

🇩🇪Germany Rar9

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

Comments & Activities

  • Issue created by @Rar9
  • 🇩🇪Germany Rar9

    it has to something with file endings. Please sugger hwo to fix this issue

    I upgrade to 1.12 via composer
    drush cr && drush advagg-caf
    drush image:flush --all

    But no image will render after update form 1.1.0 to last version.

    Version 1.1.0 live Working
    xx.avif?itok=6Rzuk7zT 1x" media="(max-width: 575px)" type="image/avif" width="360" height="252">

    Version 1.1.2 live Broken
    xx.jpg.avif?itok=PW9Sk6GL 1x" media="(max-width: 575px)" type="image/avif" width="360" height="252">

  • 🇩🇪Germany Rar9

    Any update or hint how to get this working for imagemagick php8.1 again?

  • 🇻🇳Vietnam HoangD

    Can you flush all Image Style ?

  • 🇩🇪Germany Rar9

    Yes cache and image flush work, but image names stay wrong and all optimised images will break

    Happy to do a call to show. U know how.

  • Status changed to Postponed: needs info 12 months ago
  • 🇩🇪Germany Rar9

    diff --git a/src/ImageapiOptimizeAvifWebpHelper.php b/src/ImageapiOptimizeAvifWebpHelper.php
    index 3713802..6d6fba9 100644
    --- a/src/ImageapiOptimizeAvifWebpHelper.php
    +++ b/src/ImageapiOptimizeAvifWebpHelper.php
    @@ -17,7 +17,7 @@ class ImageapiOptimizeAvifWebpHelper {
    * URI of the image without extension part.
    */
    public function extensionlessUri(string $original_uri): string {
    - return substr($original_uri, 0, strrpos($original_uri, '.'));
    + return $original_uri;
    }

    }

  • Status changed to Closed: works as designed 6 months ago
  • 🇻🇳Vietnam HoangD

    Use this patch

Production build 0.71.5 2024