@flyo/nitro-astro 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn.ts +2 -0
- package/package.json +1 -1
package/cdn.ts
CHANGED
|
@@ -32,6 +32,8 @@ const service: ExternalImageService = {
|
|
|
32
32
|
const { ...attributes } = options;
|
|
33
33
|
return {
|
|
34
34
|
...attributes,
|
|
35
|
+
width: options.width ?? null, // width and height are required to prevent CLS and enable lazy loading for chrome.
|
|
36
|
+
height: options.height ?? null, // width and height are required to prevent CLS and enable lazy loading for chrome.
|
|
35
37
|
loading: options.loading ?? 'lazy',
|
|
36
38
|
decoding: options.decoding ?? 'async',
|
|
37
39
|
};
|