Skip to content

Commit

Permalink
apply lazy loading on gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunkumarkale committed Aug 12, 2024
1 parent 9632fcb commit f068660
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Gallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Gallery = () => {
<img
src={image}
alt={`Gallery ${index}`}
className="w-full h-48 object-cover"
className="w-full h-48 object-cover" loading='lazy'
/>
</div>
))}
Expand All @@ -61,7 +61,7 @@ const Gallery = () => {
>
<FaArrowLeft />
</button>
<img src={images[currentImage]} alt={`Gallery ${currentImage}`} className="max-h-screen" />
<img src={images[currentImage]} alt={`Gallery ${currentImage}`} className="max-h-screen" loading='lazy'/>
<button
className="absolute right-0 transform translate-x-full -translate-y-1/2 p-4 bg-white rounded-full"
onClick={nextImage}
Expand Down

0 comments on commit f068660

Please sign in to comment.