Loading
Issue #3622332: Add WebP preload support when webp module is enabled
Summary
When the webp module is enabled, preload <link> tags now use WebP URLs and type="image/webp", matching <picture> output.
Fixes https://www.drupal.org/project/responsive_image_preload/issues/3622332
Related: https://www.drupal.org/project/responsive_image_preload/issues/3229962
Approach
- Optional
@?webp.webpinjection inPreloadGenerator Webp::getWebpSrcset()for URL conversion (DRY with webp module)- WebP-only preloads when webp is available (no duplicate PNG/JPEG preloads)
Test plan
- Reproduced mismatch on Drupal 11.4.4 with
responsive_image_preload2.0.1 +webp - Maintainer confirms preload links contain
.webpandtype="image/webp" - Behavior unchanged when
webpmodule is disabled