diff --git a/core/modules/image/config/install/image.style.large.yml b/core/modules/image/config/install/image.style.large.yml index c7935849a93..f3e22fbb1bb 100644 --- a/core/modules/image/config/install/image.style.large.yml +++ b/core/modules/image/config/install/image.style.large.yml @@ -3,6 +3,7 @@ status: true dependencies: { } name: large label: 'Large (480×480)' +include_in_normalized_entity: true effects: ddd73aa7-4bd6-4c85-b600-bdf2b1628d1d: uuid: ddd73aa7-4bd6-4c85-b600-bdf2b1628d1d diff --git a/core/modules/image/config/install/image.style.medium.yml b/core/modules/image/config/install/image.style.medium.yml index 775a511b0c1..d6d4b1455de 100644 --- a/core/modules/image/config/install/image.style.medium.yml +++ b/core/modules/image/config/install/image.style.medium.yml @@ -3,6 +3,7 @@ status: true dependencies: { } name: medium label: 'Medium (220×220)' +include_in_normalized_entity: true effects: bddf0d06-42f9-4c75-a700-a33cafa25ea0: uuid: bddf0d06-42f9-4c75-a700-a33cafa25ea0 diff --git a/core/modules/image/config/install/image.style.thumbnail.yml b/core/modules/image/config/install/image.style.thumbnail.yml index 73dc9b85c2b..64bb9ed0000 100644 --- a/core/modules/image/config/install/image.style.thumbnail.yml +++ b/core/modules/image/config/install/image.style.thumbnail.yml @@ -3,6 +3,7 @@ status: true dependencies: { } name: thumbnail label: 'Thumbnail (100×100)' +include_in_normalized_entity: true effects: 1cfec298-8620-4749-b100-ccb6c4500779: uuid: 1cfec298-8620-4749-b100-ccb6c4500779 diff --git a/core/modules/image/config/schema/image.schema.yml b/core/modules/image/config/schema/image.schema.yml index 4fcb6c7c591..102c7f80826 100644 --- a/core/modules/image/config/schema/image.schema.yml +++ b/core/modules/image/config/schema/image.schema.yml @@ -9,6 +9,9 @@ image.style.*: label: type: label label: 'Label' + include_in_normalized_entity: + type: boolean + label: 'Include in Normalized Entity' effects: type: sequence sequence: diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php index 7992aea57af..253f949d210 100644 --- a/core/modules/image/src/Entity/ImageStyle.php +++ b/core/modules/image/src/Entity/ImageStyle.php @@ -56,6 +56,7 @@ * config_export = { * "name", * "label", + * "include_in_normalized_entity", * "effects", * } * ) diff --git a/core/modules/image/src/Plugin/DataType/ComputedImageStyleList.php b/core/modules/image/src/Plugin/DataType/ComputedImageStyleList.php index 6343ca20915..aef8f5ade0d 100644 --- a/core/modules/image/src/Plugin/DataType/ComputedImageStyleList.php +++ b/core/modules/image/src/Plugin/DataType/ComputedImageStyleList.php @@ -27,7 +27,9 @@ protected function computedListProperty() { $height = $image_item->height; foreach (ImageStyle::loadMultiple() as $style) { - $this->list[$style->getName()] = $this->createItem($style->getName(), $this->computeImageStyleMetadata($file, $width, $height, $style)); + if (isset($style->include_in_normalized_entity) && $style->include_in_normalized_entity) { + $this->list[$style->getName()] = $this->createItem($style->getName(), $this->computeImageStyleMetadata($file, $width, $height, $style)); + } } }