0

I'm creating my own module and I need to programmatically create an image style to use with a new media type.

I found the core/profile/standard/config/optional/image.style.max_1300x1300.yml file whose content is the following one.

name: max_1300x1300
label: 'Max 1300x1300'
effects:
  04caae9a-fa3e-4ea6-ae09-9c26aec7d308:
    id: image_scale
    data:
      width: 1300
      height: 1300
      upscale: false
    weight: 1
    uuid: 04caae9a-fa3e-4ea6-ae09-9c26aec7d308
langcode: en
dependencies:
  module:
    - responsive_image
  enforced:
    module:
      - responsive_image

I take I need to create a file in config/install, named image.style.<image_style_id>.yml, with those attributes.

What UUID values should I use?

3
  • It's in the admin under configuration. – Kevin Jun 11 at 11:07
  • @Kevin thanks but not my question, I don't want to use the UI – Superhetja Jun 11 at 12:00
  • Writing out the yaml by hand is pointless. Make them in the UI and export them. – Kevin Jun 11 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.