feat(images): JPEG XL optimizer with webp/jpg fallback and <picture> serving
img_optimize() decodes .jxl with djxl or Imagick, resizes with GD, re-encodes with cjxl and writes foto.jxl.webp beside it; skips cleanly without a decoder. Gallery, hero, navbar logos and JSON-LD serve the JXL with the fallback, and trash/removal move the fallback with its .jxl.
This commit is contained in:
1 parent
8fe73eb5d6
commit
4f44bc1609
14 files changed
+260
-20
No files matched your search
@@ -39,8 +39,7 @@ function site_section_has_content(array $gym, string $sec): bool {
|
||||
'equipa' => (bool) site_team_active($pdo, $gid),
|
||||
'horario' => (bool) site_horario($pdo, '', $gid),
|
||||
'mensalidades' => (bool) site_memberships($pdo, $gid),
|
||||
'galeria' => !empty($gym['gallery_id']) && preg_grep('/\.(jpe?g|png|gif|webp|jxl)$/i',
|
||||
glob(dirname(__DIR__) . '/uploads/gallery/' . (int) $gym['gallery_id'] . '/*') ?: []),
|
||||
'galeria' => !empty($gym['gallery_id']) && img_list_dir('uploads/gallery/' . (int) $gym['gallery_id']),
|
||||
default => true,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user