Skip to content

Commit

Permalink
implement lazy loading for images on learn page
Browse files Browse the repository at this point in the history
Signed-off-by: Oyelola Victoria <[email protected]>
  • Loading branch information
VriaA committed Sep 10, 2024
1 parent f57b2e4 commit 6b81dad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sections/Learn/LearnPage-Sections/books.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const BooksSection = () => {
<div className="books-card" key={id}>
<Link className="books-page_link" to={fields.slug} >
<div className="books-image">
<img src={frontmatter.thumbnail.publicURL} alt={frontmatter.title} />
<img src={frontmatter.thumbnail.publicURL} alt={frontmatter.title} loading="lazy" />
</div>
<div className="books-details">
<h2>{frontmatter.title}</h2>
Expand Down
4 changes: 2 additions & 2 deletions src/sections/Learn/LearnPage-Sections/learn.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const LearnSection = () => {
return (
<LearnSectionWrapper>
<div className="learn-particle-img">
<img src={Meshery_Logo} alt="Meshery Logo"/>
<img src={Meshery_Logo} alt="Meshery Logo" loading="lazy" />
</div>
<div>
<h1 className="learn-heading"><span>Meshery - </span> Learn how to manage Kubernetes</h1>
Expand All @@ -196,7 +196,7 @@ const LearnSection = () => {
<Button secondary title="Managing the performance of your microservices"/>
</Link>
</Col>
<img src={OReillyLogo} alt="OReilly Logo"/>
<img src={OReillyLogo} alt="OReilly Logo" loading="lazy" />
</Row>
</Container>
<div className="learn-cards-section">
Expand Down
4 changes: 2 additions & 2 deletions src/sections/Learn/LearnPage-Sections/workshops.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const WorkshopsSection = () => {
<Col xs={12} sm={6} xl={4} className="workshops-card" key={index}>
<Link to={fields.slug} >
<div className="workshop-thumbnails">
<img src={frontmatter.thumbnail.publicURL} alt={frontmatter.title} />
<img src={frontmatter.thumbnail.publicURL} alt={frontmatter.title} loading="lazy" />
</div>
</Link>
</Col>
Expand All @@ -268,7 +268,7 @@ const WorkshopsSection = () => {
feedbackData.map((data, index) => {
return (
<Col key={index} className="feedbackCol">
<img className="blockquoteImg" src={BlockQouteImage} alt="Quote-Image" />
<img className="blockquoteImg" src={BlockQouteImage} alt="Quote-Image" loading="lazy" />
<p>{data.feedback}</p>
<h3>{data.workshop}</h3>
<h5>{data.studnt_name}</h5>
Expand Down

0 comments on commit 6b81dad

Please sign in to comment.