Make list of image styles editable

Created on 26 August 2023, 10 months ago
Updated 28 August 2023, 10 months ago

The module says this:

The used image style is dynamically determined by the resize width. Used image styles: cke_media_resize_small, cke_media_resize_medium, cke_media_resize_large, cke_media_resize_xl

The list of image styles is not editable and the list makes no deifference in the UI when adding an image in the editor - so what's the intended use of the setting?

πŸ“Œ Task
Status

Active

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

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

Comments & Activities

  • Issue created by @DamienMcKenna
  • The intended use is for example if one wants to use the core media embed plugin's view mode options. In that case, the Enable this to dynamically scale resized images using image styles should be disabled, as both things enabled at the same time IMO don't make much sense.

    Imagine you use a view mode and resize a media then save it. If the setting of the resize module is active, the media won't render in the view mode selected in the editor but the one determined by the resize width.

    It's basically possible to edit the view modes and image styles shipped with this module, so there's a (maybe not very intuitive) way to control how large the image will be rendered.

    Even better would of course be a new setting inside the resize plugin (on the textformat edit form), which one could use to add own view modes or remove the ones shipped with the module. Please feel free to submit patches for this.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    So the image styles list is a way of rendering the image inside the media entity using an image style, instead of setting up extra view modes on the media entity? The UI definitely could use a little improvement on that.

    And yes, the list of image styles definitely needs to be editable from the text format UI, instead of having to hack the list by manually editing the config file.

    Also, if you manually edit the list via the config file and import the config changes, it does mention the new styles in the text format filter's help text as expected. However if you then uncheck the "Enable this to dynamically scale resized images using image styles" option the list of image styles is lost and it reverts to the list provided by the module.

Production build 0.69.0 2024