Feature request: Ability for drupal_image() to take path/to/file.jpg as parameter

Created on 17 December 2024, 5 days ago

Problem/Motivation

This feature request is an offshoot of some Experience Builder conversations that I've been having with @lauriii.

He suggested using drupal_image() within SDC components to have control over image styles and attributes within the component.

However, for Experience Builder, we can also specify example data within our schema (this will show up when previewing the component and on initial component placement).

Unfortunately, this example data is a simple path (ex /themes/my_theme/components/hero/images/background.jpg), which does not fit into the data that drupal_image() is expecting.

Proposed resolution

Allow drupal_image() to take a path to a file as a parameter.

✨ Feature request
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mherchel Gainesville, FL, US

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

Comments & Activities

Production build 0.71.5 2024