diff --git a/site/config/config.php b/site/config/config.php
index ef5a16d..1f57aa2 100644
--- a/site/config/config.php
+++ b/site/config/config.php
@@ -32,6 +32,31 @@ return [
'1000w' => ['width' => 1000, 'format' => 'webp'],
'1456w' => ['width' => 1456, 'format' => 'webp'],
],
+ // Hero cover investigation : 940px fixe ≥1000px, 90vw en dessous
+ 'cover-hero' => [680, 940, 1200, 1880],
+ 'cover-hero-webp' => [
+ '680w' => ['width' => 680, 'format' => 'webp'],
+ '940w' => ['width' => 940, 'format' => 'webp'],
+ '1200w' => ['width' => 1200, 'format' => 'webp'],
+ '1880w' => ['width' => 1880, 'format' => 'webp'],
+ ],
+ // Body 1 colonne : 100vw
+ 'body-full' => [750, 1000, 1440, 1880],
+ 'body-full-webp' => [
+ '750w' => ['width' => 750, 'format' => 'webp'],
+ '1000w' => ['width' => 1000, 'format' => 'webp'],
+ '1440w' => ['width' => 1440, 'format' => 'webp'],
+ '1880w' => ['width' => 1880, 'format' => 'webp'],
+ ],
+ // Body 2 colonnes : 50vw ≥768px, 90vw en dessous
+ 'body-half' => [680, 720, 1000, 1380, 1440],
+ 'body-half-webp' => [
+ '680w' => ['width' => 680, 'format' => 'webp'],
+ '720w' => ['width' => 720, 'format' => 'webp'],
+ '1000w' => ['width' => 1000, 'format' => 'webp'],
+ '1380w' => ['width' => 1380, 'format' => 'webp'],
+ '1440w' => ['width' => 1440, 'format' => 'webp'],
+ ],
],
],
'panel' => [
diff --git a/site/plugins/beforeafter/snippets/blocks/beforeafter.php b/site/plugins/beforeafter/snippets/blocks/beforeafter.php
index 8718c07..2df4414 100644
--- a/site/plugins/beforeafter/snippets/blocks/beforeafter.php
+++ b/site/plugins/beforeafter/snippets/blocks/beforeafter.php
@@ -1,8 +1,13 @@
imageBefore()->toFile();
-$imageAfter = $block->imageAfter()->toFile();
-$caption = $block->caption()->value();
+$imageAfter = $block->imageAfter()->toFile();
+$caption = $block->caption()->value();
+$imgSizes = $imgSizes ?? '(min-width: 768px) 50vw, 90vw';
+$imgSrcset = $imgSrcset ?? 'body-half';
+
+$kirbyThumbs = kirby()->option('thumbs.srcsets', []);
+$srcsetAttr = isset($kirbyThumbs[$imgSrcset]) ? fn($f) => $f->srcset($imgSrcset) : fn($f) => $f->srcset();
?>
@@ -11,12 +16,16 @@ $caption = $block->caption()->value();
diff --git a/site/snippets/blocks/gallery.php b/site/snippets/blocks/gallery.php
index 0cfe021..4e03f0c 100644
--- a/site/snippets/blocks/gallery.php
+++ b/site/snippets/blocks/gallery.php
@@ -1,6 +1,8 @@
images()->toFiles();
+$images = $block->images()->toFiles();
+$imgSizes = $imgSizes ?? '(min-width: 768px) 50vw, 90vw';
+$imgSrcset = $imgSrcset ?? 'body-half';
?>