Make image style preset overidable in a per-theme basis.

Created on 23 February 2011, about 14 years ago
Updated 11 February 2025, 12 days ago

Hello all,

Image style preset is really a neat feature, but there is a caveat when you use it. If you have multiple themes on your Drupal installation, you may want to use the same preset name (e.g. "thumbnail") to display in the same content type build mode (e.g. "teaser"), but it might not fit with all themes.

Since the build modes are more or less theme agnostic, I think that presets should be theme aware, and each theme should be able to define its own overrides for styles.

Example, I display a node teaser in my left region in bartik, this teaser display a thumbnail, this thumbnail is 200px wide. Now, I want to display the same node in another theme in the same site, for which the left region is 400px wide, I would like my teaser preset to be displayed in 400px wide.

Since the build modes are theme agnostic, styles also are. But styles definitely are the link between the real image and its display within the theme.

Schema would be something like:

[Build mode (field_my_image)] n ---> 1 [Style (thumbnail)] n <----> n [Theme (bartik)]

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

image.module

Created by

πŸ‡«πŸ‡·France pounard

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.

  • πŸ‡ΊπŸ‡Έ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