Value-less naming option

Created on 23 February 2024, 10 months ago

Hi,
thank you for such module. It created me dozens of image styles in few seconds … after hours struggling with the setup. :D

Problem/Motivation

I would like to have the ID's and Labels without specific sizes (e.g. instead 600 have string "medium"), but that is currently not possible. If you don't use any calculated token in the name structure the migration will only create the last item. It took me some time to figure that out (would be nice to document that at least).

Steps to reproduce

Create a config which should produce few combinations of base_sizes, size_scales and style_group. Use
id_pattern: '{{group_id}}_{{aspect_ratio_width}}_{{aspect_ratio_height}}_{{size_scale_decimal}}x' as the pattern to generate ID.

Proposed resolution

Would be nice there some warning that the resulting image styles do have the same ID, because of the pattern.
Would be great if there is an option to define optional "base_strings" to map to "base_sizes" and use them as a pattern.

Thanks for a time saving module!

Feature request
Status

Active

Version

1.1

Component

Code

Created by

🇨🇿Czech Republic Petr Illek

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

Comments & Activities

  • Issue created by @Petr Illek
  • 🇺🇸United States rlhawk Seattle, Washington, United States

    I think this is a great idea. I suppose we just need to check if base_sizes is a string or an array. If it's a string, we consider it a number value; if it's an array, we assume it's a label–number value pair.

Production build 0.71.5 2024