Skip to content

Commit

Permalink
feat: add loading="lazy" by default to all presets
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo committed Jan 12, 2022
1 parent 7c3e29c commit 24bf381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ export function extractSourceAttrs ({ media, sizes, ...attrs }: any): [ImageAttr
const sourceAttrs: Partial<ImageSource> = {}
if (media) sourceAttrs.media = media
if (sizes) sourceAttrs.sizes = sizes
return [attrs, sourceAttrs]
return [{ loading: 'lazy', ...attrs }, sourceAttrs]
}

0 comments on commit 24bf381

Please sign in to comment.