Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: optimize next/image (#3288)
Browse files Browse the repository at this point in the history
kkrishguptaa authored Jan 13, 2023
1 parent 6b865b4 commit 81efe4b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -284,8 +284,9 @@ export default function Home({ total, today }) {
</div>
<div className="aspect-w-5 aspect-h-3 -mt-6 md:aspect-w-2 md:aspect-h-1">
<Image
className="translate-x-6 translate-y-6 transform rounded-md object-cover object-left-top sm:translate-x-16 lg:translate-y-20"
className="translate-x-6 translate-y-6 transform rounded-md object-cover object-left-top sm:translate-x-16 lg:translate-y-20 h-auto w-auto"
src="/mockup.png"
priority
alt="App screenshot"
width={500}
height={500}
@@ -366,10 +367,12 @@ export default function Home({ total, today }) {
)}
>
<div className="aspect-w-5 aspect-h-2 overflow-hidden rounded-lg bg-gray-100">
<img
<Image
src={feature.imageSrc}
alt={feature.imageAlt}
className="object-cover object-center"
width={1250}
height={840}
/>
</div>
</div>

0 comments on commit 81efe4b

Please sign in to comment.