Convert image-style cannot convert GIF to WEBP (Lost animation).

Created on 12 July 2022, over 2 years ago
Updated 25 July 2023, over 1 year ago

Problem/Motivation

I want to add a convert image style for change all image extension to WEBP, but when convert GIF to WEBP, it lost animation.Is the ImageMagick convert function don't support GIF to WEBP?Or my configuration not correct.

💬 Support request
Status

RTBC

Version

3.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • 🇫🇷France Dom.

    RTBC for patch at #6.
    Also, to get this to work, don't forget to activate the "-coalesce" option in the advanced settings (not really sure why this is not activated by default in the module?)

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy mondrake 🇮🇹

    I do not think this is the right way to address this. It would introduce a behaviour change vs current state where only the first frame is converted for animated GIFs. We might argue whether the current state is the right one or not, but no matter what we cannot simply change the behaviour like this.

    I'd rather go a path similar to #2786435: Support '-coalesce' of Animated GIF image files where a configuration setting was introduced for the purpose. So each site owner to decide.

    We also need tests.

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    30 pass
  • 🇺🇦Ukraine vredko

    thanks @internetter but patch#6 doesn't work for me.
    i've created new patch. also checking "-coalesce" option which can be apply to gif and webp destination format.

  • First commit to issue fork.
  • Pipeline finished with Failed
    2 months ago
    Total: 189s
    #410678
  • Pipeline finished with Failed
    2 months ago
    #410680
  • Pipeline finished with Failed
    2 months ago
    #410681
  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    trackleft2 changed the visibility of the branch 3295470-convert-image-style-cannot to hidden.

  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    The patch from #10 works for me, I've create a merge request with the patch so we can continue work on this.
    Changing to Needs work, because the maintainer said this needs tests.

  • Pipeline finished with Success
    2 months ago
    Total: 287s
    #410687
  • Pipeline finished with Failed
    2 months ago
    Total: 300s
    #410774
  • Pipeline finished with Failed
    2 months ago
    Total: 521s
    #413768
  • Pipeline finished with Canceled
    2 months ago
    Total: 83s
    #413806
  • Pipeline finished with Failed
    2 months ago
    Total: 322s
    #413807
  • Pipeline finished with Failed
    2 months ago
    Total: 475s
    #413823
  • Pipeline finished with Failed
    2 months ago
    Total: 302s
    #413892
  • Pipeline finished with Canceled
    2 months ago
    Total: 221s
    #413900
  • Pipeline finished with Success
    2 months ago
    Total: 308s
    #413902
  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    I've added a PHPUnit test

  • Pipeline finished with Success
    2 months ago
    Total: 373s
    #413932
  • Pipeline finished with Success
    2 months ago
    Total: 390s
    #413936
  • 🇺🇸United States joegraduate Arizona, USA

    Manually triggered the "tests only" pipeline on the MR and saw that the new test added passes even without the other MR changes which I don't think is the expected result.

    Spoke to @trackleft2 about this on Slack and he mentioned that he thinks he needs to add something to the test that verifies the generated file is still actually a multiframe image.

Production build 0.71.5 2024