Skip to content

Commit

Permalink
EWPP-4149: Update Publication thumbnail image style.
Browse files Browse the repository at this point in the history
  • Loading branch information
22Alexandra committed Jun 12, 2024
1 parent e4f7d8f commit dd5352c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ dependencies: { }
name: oe_theme_publication_thumbnail
label: 'Publication thumbnail'
effects:
44898002-78b0-4133-acb6-c08d5c208e01:
uuid: 44898002-78b0-4133-acb6-c08d5c208e01
id: image_scale
e3147a94-c49f-4d60-8bf4-dc8c21431d77:
uuid: e3147a94-c49f-4d60-8bf4-dc8c21431d77
id: retina_image_scale
weight: 1
data:
width: 192
height: 192
width: 600
height: 400
upscale: false
multiplier: 2
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,26 @@ function oe_theme_content_publication_post_update_30001(): void {
$display->save();
}
}

/**
* Update Publication thumbnail image style.
*/
function oe_theme_content_publication_post_update_00011(): void {
$image_style = ImageStyle::load('oe_theme_publication_thumbnail');
if (!$image_style) {
return;
}
$effect = $image_style->getEffect('44898002-78b0-4133-acb6-c08d5c208e01');
if ($effect) {
$image_style->deleteImageEffect($effect);
}
$image_style->addImageEffect([
'id' => 'retina_image_scale',
'weight' => 1,
'data' => [
'width' => 600,
'height' => 400,
],
]);
$image_style->save();
}

0 comments on commit dd5352c

Please sign in to comment.