recipe.yml
1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Images
type: Drupal CMS
description: Sets up base image configuration including responsive image styles, view modes, focal point-based cropping and SVG images.
recipes:
- core/recipes/image_media_type
install:
# Responsive image styles are pinned to Olivero breakpoints so we require it here.
# We would like for people to be able to switch and disable themes without affecting image styles.
# See https://www.drupal.org/project/drupal_cms/issues/3491177
- olivero
- focal_point
- responsive_image
- svg_image
config:
# Treat field storages strictly since they influence the database layout.
strict:
- field.storage.media.field_media_svg_image
import:
focal_point: '*'
actions:
core.entity_form_display.media.image.*:
setComponents:
-
name: field_media_image
options:
type: image_focal_point
weight: 1
region: content
settings:
progress_indicator: throbber
preview_image_style: media_library
preview_link: true
offsets: '50,50'
-
# Enable the name field in the entity form so it can be modified.
name: name
options:
type: string_textfield
weight: -1
region: content
hideComponents:
- uid
- langcode
- path
- created
core.entity_view_display.media.image.media_library:
setComponent:
name: thumbnail
options:
settings:
image_style: media_library_square_thumbnail
# Disable the `files` view because it is not clear to most users what the
# difference is between "Files" and "Media". We favor media.
views.view.files:
disable: {}