Extracting the new image style uri value

Created on 9 September 2022, over 2 years ago
Updated 17 August 2023, over 1 year ago

Problem/Motivation

I'm doing some theming, and I'd like to extract the new multicropped image uri.

In my example, it's a pretty common scenario of getting image uri for use as a background image on a paragraph. Assign it to $variables and use twig to setup the css.

The trouble is that this isn't available in the system until the preprocessing of the image formatter, so basically the end of the line.

I am currently using a helper function that combines the display settings with the media item to build he proper path. Even still it is missing itoken support. It would be great if this wasn't so challenging to do.

Proposed resolutions

I'm not sure how best to proceed, so here are some ideas I've thrown around:

  1. Expose a helper method through a service that wraps up the functionality.
  2. Implement modified logic to change how the image style gets applied.
  3. provide a multicrop image url formatter

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States devkinetic

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024