You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,20 @@ Default: `[]`
68
68
Description: *list of extension for which the transformation will be ignored*
69
69
Example: `extensionIgnore: ['svg']` will ignore transformation for images with the `svg` extension
70
70
71
+
#### `lazySrcset`
72
+
73
+
Type: `String`
74
+
Default: `data-srcset`
75
+
Description: *The attribute used for lazy webp loading. It will be set on created `<source>` to later be processed by external lazy loading library.*
76
+
Example: `lazySrcset: 'my-srcset'` will set `my-srcset` attribute on `<source>`
77
+
78
+
#### `lazySrc`
79
+
80
+
Type: `String`
81
+
Default: `data-src`
82
+
Description: *The attribute used for lazy webp loading. The original `<img>` may not contain `src` at all, but instead some custom lazy-loading attribute. Or it may contain just a placeholder image inside `src` which shouldn't be used for webp conversion. `lazySrc` will define a custom attribute name to look at when processing your lazy loaded images. Note that `lazySrcset` is still needed even if `<img>` has only `lazySrc` defined, because `srcset` is the mechanism for defining a source file for the `<source>`. See `lazySrcset` option description.*
83
+
Example: `lazySrc: 'my-src'` will convert an image inside `my-src` attribute, instead of regular `src`.
0 commit comments