Fix product images on mobile: use explicit width/height instead of fill
Some checks are pending
Build and Deploy / build (push) Waiting to run
Some checks are pending
Build and Deploy / build (push) Waiting to run
This commit is contained in:
@@ -180,15 +180,15 @@ export default function ProductDetail({ product, relatedProducts, locale = "SR"
|
||||
)}
|
||||
|
||||
{/* Main Image */}
|
||||
<div className="relative aspect-square bg-[#f8f9fa] overflow-hidden">
|
||||
<div className="relative bg-[#f8f9fa] overflow-hidden">
|
||||
{images[selectedImage] && (
|
||||
<Image
|
||||
src={images[selectedImage].url}
|
||||
alt={images[selectedImage].alt || localized.name}
|
||||
fill
|
||||
className="object-cover"
|
||||
width={600}
|
||||
height={600}
|
||||
className="w-full h-auto object-cover"
|
||||
priority
|
||||
sizes="(max-width: 1024px) 100vw, 50vw"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user