Duplicate markup generated for core "webp" conversion image style

Created on 26 January 2022, over 2 years ago
Updated 28 April 2024, 2 months ago

Problem/Motivation

Drupal 9.2 added the ability to convert images to webp format. If a user has an image style configured to convert to webp format, the webp module seems to add its own <source> element that is a duplicate of the one that core provides.

Steps to reproduce

Using Drupal 9.2+, configure a responsive image style that references an image style that has a webp conversion. Notice that there is also a <source> element added by this module, which should be identical to the one that core provides.

Proposed resolution

Do not generate a source element for an image that is pre-converted to webp by an image style.

Remaining tasks

Write patch, test, and commit.

User interface changes

None

API changes

None

Data model changes

None

Thanks!

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Luke.Leber Pennsylvania

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024