Link missing on SVGs with responsive image formatter

Created on 3 November 2024, 4 months ago

Problem/Motivation

While working on 📌 Formatters shouldn't repeat core code Needs review , I noticed a bug concerning the link feature in the SvgResponsiveImageFormatter. When I disable the setting, the formatter ignores the setting.

Steps to reproduce

  • Configure some view mode of an image media to use this module's responsive image formatter
  • Enable and set it to e.g. "Content"
  • Leave unchecked
  • View a page that references a media entity of the selected type, using an SVG image

Expected result: the image is linked to the content.
Actual result: the image is not linked.

If I enable the setting , the link appears.

Proposed resolution

Wrap the render array with a #link, just like SvgImageFormatter does.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

🇩🇪Germany mrshowerman Munich

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024