Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

WebP fallback image

1,400 sites Security covered Drupal 10–11
View on drupal.org

This module allows you to automatically convert images to the WebP format for modern browsers and generate fallback JPG versions when needed. It integrates with Drupal's image styles to ensure optimal quality and efficient file sizes.

Use Drupal core's webp support to set up conversion in image styles. This way prepare the best quality images for modern web browsers. This module will prepare a fallback jpg image from the stylized webp to be used by fewer browsers: https://caniuse.com/webp. The module does not generate unnecessary jpg images, they are generated only when specifically requested.

Installation

  • Install and enable this module.
  • Enable responsive image module.
  • In image styles add effect Convert and Convert to WEBP.
  • Create each image style responsive image style.
  • Use responsive image style in entities display settings for images.

Dependencies

Responsive Image (core module)

Similar modules

Rationale

While similar modules provide solutions for generating the fallback jpeg images for webp, we found that they are doing this in a sub-optimal way.
The primary problem is that they don't create the webp derivative directly from the source file, but they are first creating a jpeg (or sometimes png or gif according to the original file's format) and then converting it to a webp. As the image styles are in most cases downscaled and the jpeg lossy compression is applied, the potential quality and/or size benefits of moving to the webp format this way essentially are wasted.
Another issue, a performance-related one we've seen in similar modules is that they are creating the jpeg and the webp derivatives at the same, single request. We believe that a request for a webp image should not generate a jpeg - maybe that jpeg will never be used! Our module will generate the jpeg images only when they are requested - it might also create 2 images in the same request, when the request goes for a jpeg but the webp does not exist yet, but this is a very unlikely case.
More background: https://www.brainsum.com/blog/webp-right-way-and-wrong-way-drupal

Depends on

Dependencies of the latest stable release

  • file Drupal core
  • responsive_image Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Apr 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.2.6 Stable 10–11 Apr 25, 2025