Skip to content

Commit

Permalink
Reduce loading size of product images
Browse files Browse the repository at this point in the history
  • Loading branch information
LrDevEng committed Oct 16, 2024
1 parent b0492be commit e2aee05
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/(main)/cart/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export default async function CartPage() {
className={styles.productImage}
src={`/images/${productDb.imgName}`}
alt={`Image of ${productDb.name}`}
width={600}
height={400}
width={300}
height={200}
style={{ backgroundColor: 'gray' }}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/(shop)/shop/ProductCardSmall.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
margin: auto;
width: 100%;
max-width: 300px;
max-height: 200px;
height: auto;
max-height: 200px;
}

&:hover {
Expand Down
4 changes: 2 additions & 2 deletions app/(shop)/shop/ProductCardSmall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export default function ProductCardSmall({ product }: Props) {
className={styles.productImage}
src={`/images/${product.imgName}`}
alt={`Image of ${product.name}`}
width={600}
height={400}
width={300}
height={200}
style={{ backgroundColor: 'gray' }}
data-test-id="product-image"
/>
Expand Down
4 changes: 2 additions & 2 deletions app/(shop)/shop/product/[productId]/ProductCardBig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export default function ProductCardBig({ product }: Props) {
<Image
src={`/images/${product.imgName}`}
alt={`Image of ${product.name}`}
width={600}
height={400}
width={300}
height={200}
className={styles.img}
data-test-id="product-image"
/>
Expand Down

0 comments on commit e2aee05

Please # to comment.