Skip to content

Commit 2417da9

Browse files
committed
Lazy loading images
1 parent a36b93f commit 2417da9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/home/AboutUs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const AboutUs = () => {
2121

2222

2323
<div className="flex flex-col lg:flex-row items-center mb-10 px-10 gap-7 space-x-7">
24-
<img src={image} alt="Andela Engineers" className="w-[500px] h-auto rounded-lg shadow-md mb-6 lg:mb-0" />
24+
<img src={image} alt="Andela Engineers" className="w-[500px] h-auto rounded-lg shadow-md mb-6 lg:mb-0" loading="lazy"/>
2525

2626
<div className='max-w-2xl px-10'>
2727
<h1 className='text-3xl sm:text-4xl md:text-5xl font-bold mb-4 leading-tight dark:text-white'>

src/components/home/Blogs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { toast } from 'react-toastify';
3434
const BlogCard = ({ blog }: { blog: Blog }) => (
3535
<div key={blog.id} className="bg-gray-200 dark:bg-dark-frame-bg dark:text-white text-primary shadow-lg rounded-lg cursor-pointer hover:shadow-xl transition duration-300" >
3636
<Link to={`/blogs/${blog.id}`}>
37-
<img src={blog.coverImage} alt={blog.title} className="w-full h-40 object-cover mb-4" />
37+
<img src={blog.coverImage} alt={blog.title} className="w-full h-40 object-cover mb-4" loading="lazy"/>
3838
</Link>
3939
<div className="p-3">
4040
<Link to={`/blogs/${blog.id}`}>

0 commit comments

Comments
 (0)