Image styles to support dynamic arguments

Created on 6 August 2012, almost 13 years ago
Updated 10 May 2025, 2 days ago

Drupal has a very powerful image manipulation UI, so why write code when we can easily use that for any purpose?!
The problem is we can't! The reason is image manipulation UI only accepts one argument which is the source image.
All other parameters and options are static. For example if you want to put the source image behind a frame you can,
but if you want to dynamically change frame's image you either have to make new preset/style for each different frame
or write a custom special action.

Another example is rendering texts dynamically, you can pass any text you want to the image style and have it rendered without writing any custom action

The ideal solution is proper argument support by drupal's core image module , something like Views arguments
Also it's not currently possible to use tokens or context in image styles/presets. One of the advantages of token support is to use parameters of the last effect
in the next one. For example we can scale an image by width and then use the new height size to crop image's width and height in the next effect. This also opens up the possibility
to have much smarter effects and combine them together like Color detector, it can detect the major colors used in an image and when can use the most used one as the image's background color or color filter!

Feature request
Status

Postponed: needs info

Version

11.0 🔥

Component

image system

Created by

🇮🇷Iran sinasalek

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

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.

  • 🇺🇸United States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024