diff --git a/public/images/locations/dino-hero-banner.png b/public/images/locations/dino-hero-banner.png new file mode 100644 index 0000000..1837414 Binary files /dev/null and b/public/images/locations/dino-hero-banner.png differ diff --git a/src/app/(frontend)/lokatsii/dynozavry/page.tsx b/src/app/(frontend)/lokatsii/dynozavry/page.tsx index 0845382..3c8c272 100644 --- a/src/app/(frontend)/lokatsii/dynozavry/page.tsx +++ b/src/app/(frontend)/lokatsii/dynozavry/page.tsx @@ -80,8 +80,10 @@ export default async function DinosaurPage() { const bg = loc?.heroBackground if (bg && typeof bg !== 'number') heroBgUrl = (bg as Media).url ?? null } catch { - // DB unavailable at build time — render with fallbacks; ISR will hydrate at runtime + // DB unavailable at build time — ISR will hydrate at runtime } + // Fall back to static PNG (lossless, no Payload compression) when CMS has no image + heroBgUrl = heroBgUrl ?? '/images/locations/dino-hero-banner.png' const features = data.heroFeatures?.map((f) => f.text).filter(Boolean) as string[] | undefined diff --git a/src/collections/Media.ts b/src/collections/Media.ts index 5a11582..4339645 100644 --- a/src/collections/Media.ts +++ b/src/collections/Media.ts @@ -12,26 +12,26 @@ export const Media: CollectionConfig = { name: 'mobile', width: 640, height: undefined, - formatOptions: { format: 'webp', options: { quality: 82 } }, + formatOptions: { format: 'webp', options: { quality: 88 } }, }, // Планшет / картки (до 1200px) { name: 'tablet', width: 1200, height: undefined, - formatOptions: { format: 'webp', options: { quality: 82 } }, + formatOptions: { format: 'webp', options: { quality: 88 } }, }, // Десктоп / hero (до 1920px) { name: 'desktop', width: 1920, height: undefined, - formatOptions: { format: 'webp', options: { quality: 82 } }, + formatOptions: { format: 'webp', options: { quality: 92 } }, }, ], adminThumbnail: ({ doc }) => (doc.sizes?.tablet?.url ?? doc.url) as string, // Конвертуємо оригінал у WebP при завантаженні - formatOptions: { format: 'webp', options: { quality: 85 } }, + formatOptions: { format: 'webp', options: { quality: 92 } }, resizeOptions: { width: 1920, withoutEnlargement: true }, }, admin: {