diff --git a/app/components/partner-grid.php b/app/components/partner-grid.php
index 169eba7..2010de8 100644
--- a/app/components/partner-grid.php
+++ b/app/components/partner-grid.php
@@ -18,10 +18,10 @@ $partners = json_load('partners')['partners'] ?? [];
-
+
loading="lazy" decoding="async">
-
+
loading="lazy" decoding="async">
diff --git a/app/helpers.php b/app/helpers.php
index b5e0e2e..a923201 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -96,6 +96,35 @@ function json_load(string $name): array
return $cache[$name];
}
+/**
+ * Intrinsische Bildmaße als ' width="…" height="…"' für CLS-freie
![]()
-Tags.
+ * $rel = Pfad relativ zu public/assets/. PNG/JPG via getimagesize, SVG via
+ * viewBox (Fallback: width/height-Attribute, Einheiten werden ignoriert —
+ * fürs Seitenverhältnis reicht die Zahl). Liefert '' wenn nicht bestimmbar.
+ */
+function img_intrinsic_attrs(string $rel): string
+{
+ static $cache = [];
+ if (!isset($cache[$rel])) {
+ $file = PUBLIC_PATH . '/assets/' . ltrim($rel, '/');
+ $w = $h = 0;
+ if (is_file($file)) {
+ if (str_ends_with(strtolower($file), '.svg')) {
+ $svg = (string) file_get_contents($file);
+ if (preg_match('/viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/', $svg, $m)) {
+ [$w, $h] = [(int) round((float) $m[1]), (int) round((float) $m[2])];
+ } elseif (preg_match('/