Chargement conditionnel de Swiper (CDN UMD) sur le template event. Srcset dédié sans crop, 6 largeurs jusqu'à 3200w, toujours WebP. Première slide en eager, suivantes en lazy. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
747 B
PHP
22 lines
747 B
PHP
<?php
|
|
|
|
// Slideshow pleine largeur : 100vw, ratio natif conservé (pas de crop)
|
|
// Largeurs couvrent 1x et 2x (retina) jusqu'à 1600px d'écran
|
|
return [
|
|
'event-slideshow' => [
|
|
'400w' => ['width' => 400],
|
|
'800w' => ['width' => 800],
|
|
'1200w' => ['width' => 1200],
|
|
'1600w' => ['width' => 1600],
|
|
'2400w' => ['width' => 2400],
|
|
'3200w' => ['width' => 3200],
|
|
],
|
|
'event-slideshow-webp' => [
|
|
'400w' => ['width' => 400, 'format' => 'webp'],
|
|
'800w' => ['width' => 800, 'format' => 'webp'],
|
|
'1200w' => ['width' => 1200, 'format' => 'webp'],
|
|
'1600w' => ['width' => 1600, 'format' => 'webp'],
|
|
'2400w' => ['width' => 2400, 'format' => 'webp'],
|
|
'3200w' => ['width' => 3200, 'format' => 'webp'],
|
|
],
|
|
];
|