feat(images): enable Next.js image optimization with complete upstream buffer retrieval and explicit MIME types
This commit is contained in:
1 parent
89e59c8427
commit
08ad51152f
4 files changed
+81
-11
No files matched your search
@@ -198,7 +198,6 @@ export default function Hero({ banners = [], onShopNavigate }: { banners?: Banne
|
||||
alt={banner.title || "Canina Pharma Germany"}
|
||||
fill
|
||||
priority={idx === 0}
|
||||
unoptimized={true}
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 600px"
|
||||
className="object-cover"
|
||||
/>
|
||||
@@ -211,7 +210,6 @@ export default function Hero({ banners = [], onShopNavigate }: { banners?: Banne
|
||||
alt={activeBanner?.title || "Canina Pharma Germany"}
|
||||
fill
|
||||
priority
|
||||
unoptimized={true}
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 600px"
|
||||
className="object-cover"
|
||||
/>
|
||||
|
||||
@@ -104,12 +104,7 @@ export default function SafeImage({
|
||||
unoptimized={
|
||||
isBlobOrData ||
|
||||
!isAllowedHost ||
|
||||
(typeof src === 'string' && (
|
||||
src.startsWith('/api/uploads/') ||
|
||||
src.startsWith('/api/media/') ||
|
||||
src.startsWith('/uploads/') ||
|
||||
src.toLowerCase().endsWith('.svg')
|
||||
))
|
||||
(typeof src === 'string' && src.toLowerCase().endsWith('.svg'))
|
||||
}
|
||||
className={cn(
|
||||
"transition-all duration-500 w-full h-full object-contain",
|
||||
|
||||
Reference in new issue
Block a user