Responsive image formatter does not support URL/Link options

Created on 28 June 2019, over 5 years ago
Updated 30 December 2022, about 2 years ago

Problem/Motivation

Follow up issue for #2829990: Image formatter does not support URL/Link options β†’

When using a responsive image field formatter and adding a link to a file or hosting entity, URL options are not handled by the native image formatter so it is impossible to add a class or other attributes to the generated link...

function : template_preprocess_responsive_image_formatter
template : responsive-image-formatter.html.twig

Proposed resolution

Use the link() Twig method to render the linked responsive image, so URL options are output as expected.

Remaining tasks

  1. Review
  2. Commit

User interface changes

None.

API changes

Linked responsive images can now render link attributes.

Data model changes

None.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Responsive imageΒ  β†’

Last updated 2 days ago

Created by

πŸ‡³πŸ‡±Netherlands idebr

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

No activities found.

Production build 0.71.5 2024