Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

wpf

1,225 sites Security covered
View on drupal.org

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

Activity

Total releases
1
First release
Apr 2025
Latest release
11 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.2.6 Stable Apr 25, 2025