Skip to content

Commit

Permalink
perf(image): add image lazy loading in markdown
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Oct 19, 2024
1 parent fa027f8 commit dd71a3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const MarkdownBlockImage = (
<Media
type="photo"
{...props}
loading="lazy"
src={src}
height={media?.height || props.height}
width={media?.width || props.width}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const MarkdownInlineImage = (
<Media
type="photo"
{...props}
loading="lazy"
src={populatedUrl}
mediaContainerClassName={cn("inline max-w-full rounded-md")}
popper
Expand Down

0 comments on commit dd71a3a

Please sign in to comment.