images with 'image style' should have relative link

Created on 21 January 2025, 9 days ago

Problem/Motivation

Several components apply an 'image style' to an image. This results in an absolute HTTP URL.
Obviously this looks messy and doesn't help SEO.

Steps to reproduce

Proposed resolution

Render the links relative, e.g. :

            $url = civictheme_media_image_get_url($media, $image_style);
            $vars['url'] = \Drupal::service('file_url_generator')->transformRelative($url);

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.8

Component

Code

Created by

🇬🇧United Kingdom mwjansen Bristol

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