How to Enable AVIF Image Support in Drupal 11.2 for Faster Page Loads
A recent blog post by a developer who goes by the pseudonym 'nexgismo' explores the performance benefits and technical hurdles of enabling AVIF image support in Drupal 11.2 and above. AVIF, a next-gen image format, can reduce file sizes by up to 50% compared to JPEG, making it a compelling choice for media-heavy sites. While Drupal now allows AVIF conversion via Image Styles, server-side support for libavif within PHP GD is essential—an often-overlooked requirement that may block adoption on shared hosting.
The post outlines a straightforward configuration process, including fallbacks via <picture>
tags and optional use of contrib modules like AVIF and ImageAPI Optimize AVIF for finer control. It also includes a quick browser compatibility chart, noting AVIF’s limited support on older Apple devices. The setup is pitched as a "small effort, big gain" upgrade for developers already on Drupal 11.2+.
Despite its informal tone and absence of production benchmarks, the article offers tested, step-by-step implementation advice. It's particularly useful for developers optimizing load times without sacrificing image quality, though the lack of attention to long-term maintainability or deployment edge cases leaves room for deeper analysis.