File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @builder.io/react " : patch
3+ " @builder.io/sdk-angular " : patch
4+ " @builder.io/sdk-react-nextjs " : patch
5+ " @builder.io/sdk-qwik " : patch
6+ " @builder.io/sdk-react " : patch
7+ " @builder.io/sdk-solid " : patch
8+ " @builder.io/sdk-svelte " : patch
9+ " @builder.io/sdk-vue " : patch
10+ ---
11+
12+ Add loading=lazy to RawImg component for better perf
Original file line number Diff line number Diff line change @@ -32,7 +32,12 @@ class ImgComponent extends React.Component<ImgProps> {
3232 const attributes = this . props . attributes || { } ;
3333 const srcset = this . getSrcSet ( ) ;
3434 return (
35- < img { ...this . props . attributes } src = { this . props . image || attributes . src } srcSet = { srcset } />
35+ < img
36+ loading = "lazy"
37+ { ...this . props . attributes }
38+ src = { this . props . image || attributes . src }
39+ srcSet = { srcset }
40+ />
3641 ) ;
3742 }
3843}
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export default function ImgComponent(props: ImgProps) {
5151
5252 return (
5353 < img
54+ loading = "lazy"
5455 style = { {
5556 objectFit : props . backgroundSize || 'cover' ,
5657 objectPosition : props . backgroundPosition || 'center' ,
You can’t perform that action at this time.
0 commit comments