Skip to content

Commit

Permalink
feat(netlify-cms-core): add lazy property to images in Media Library (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Takeno committed Apr 25, 2023
1 parent e077a73 commit aa16cb8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class MediaLibraryCard extends React.Component {
<CardImageWrapper>
{isDraft ? <DraftText data-testid="draft-text">{draftText}</DraftText> : null}
{url && isViewableImage ? (
<CardImage src={url} />
<CardImage loading="lazy" src={url} />
) : (
<CardFileIcon data-testid="card-file-icon">{type}</CardFileIcon>
)}
Expand Down

0 comments on commit aa16cb8

Please sign in to comment.