AVIF conversion with WEBP fallback

Created on 3 March 2025, about 1 month ago

Problem/Motivation

As per #3372932-40: [Meta] High-performance images (nearly) out of the box β†’ we may need a new Image Effect to convert to AVIF if it's supported, with a fallback to WEBP if it's not. Possibly this could be generic for other formats too, but for now only AVIF has explicit requirements.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component

image system

Created by

πŸ‡¦πŸ‡ΊAustralia mstrelan

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

Merge Requests

Comments & Activities

  • Issue created by @mstrelan
  • Merge request !11361AvifImageEffect β†’ (Open) created by mstrelan
  • Pipeline finished with Failed
    about 1 month ago
    Total: 113s
    #439373
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Quick PoC of an image effect with fallback format. Setting to NR for feedback on the approach, please don't send it back for tests/lint/CR etc.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 1035s
    #439375
  • Pipeline finished with Failed
    29 days ago
    Total: 187s
    #442402
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Added a test for when AVIF is supported and another test for the fallback. Added a draft CR. This is ready for review.

  • Pipeline finished with Success
    29 days ago
    Total: 1488s
    #442403
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Could the IS get some love. Wouldn't this be considered an API change?

    Wonder if a CR is required?

  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Updated the IS to hopefully make it clearer. There is already a CR, are you suggesting it might not be necessary? I think it is useful.

  • πŸ‡¦πŸ‡ΊAustralia mstrelan
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Re #5:

    Wouldn't this be considered an API change?

    It's a new plugin, not a change to an existing one, so no breakage here. You could argue the change to the protected function in GDToolkit is a BC break, but plugins are considered internal and it's a protected method as well, so I don't think it's an issue.

  • πŸ‡«πŸ‡·France andypost

    I find it good/handy feature with CR)

    Moreover AVIF is specifically good for big sizes with fallback

  • πŸ‡¬πŸ‡§United Kingdom catch

    Moreover AVIF is specifically good for big sizes with fallback

    Not necessarily in this issue, could maybe be a follow-up, would we want to consider some kind of configurable filesize threshold where below a certain point we always skip AVIF and use webp instead? Have seen various discussions that decoding AVIF in the browser is a lot more expensive than webp, which can undo the bandwidth savings with smaller images.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Opened up πŸ“Œ Consider falling back to webp based on filesize Active for that discussion.

Production build 0.71.5 2024