Fix product images showing full picture instead of cropped
Some checks failed
Build and Deploy / build (push) Has been cancelled
Some checks failed
Build and Deploy / build (push) Has been cancelled
This commit is contained in:
@@ -33,7 +33,7 @@ export default function ProductCard({ product, index = 0, locale = "SR" }: Produ
|
|||||||
src={image}
|
src={image}
|
||||||
alt={localized.name}
|
alt={localized.name}
|
||||||
fill
|
fill
|
||||||
className="object-cover transition-transform duration-700 ease-out group-hover:scale-105"
|
className="object-contain transition-transform duration-700 ease-out group-hover:scale-105"
|
||||||
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 25vw"
|
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 25vw"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ export default function ProductDetail({ product, relatedProducts, locale = "SR"
|
|||||||
src={image.url}
|
src={image.url}
|
||||||
alt={image.alt || localized.name}
|
alt={image.alt || localized.name}
|
||||||
fill
|
fill
|
||||||
className="object-cover"
|
className="object-contain"
|
||||||
sizes="80px"
|
sizes="80px"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
@@ -186,7 +186,7 @@ export default function ProductDetail({ product, relatedProducts, locale = "SR"
|
|||||||
src={images[selectedImage].url}
|
src={images[selectedImage].url}
|
||||||
alt={images[selectedImage].alt || localized.name}
|
alt={images[selectedImage].alt || localized.name}
|
||||||
fill
|
fill
|
||||||
className="object-cover"
|
className="object-contain"
|
||||||
priority
|
priority
|
||||||
sizes="(max-width: 1024px) 100vw, 50vw"
|
sizes="(max-width: 1024px) 100vw, 50vw"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user