diff options
-rw-r--r-- | .changeset/quiet-bananas-obey.md | 5 | ||||
-rw-r--r-- | packages/integrations/image/components/Picture.astro | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/quiet-bananas-obey.md b/.changeset/quiet-bananas-obey.md new file mode 100644 index 000000000..42ed93312 --- /dev/null +++ b/.changeset/quiet-bananas-obey.md @@ -0,0 +1,5 @@ +--- +'@astrojs/image': patch +--- + +Bug: Updating the <Picture /> component to default to async image decoding diff --git a/packages/integrations/image/components/Picture.astro b/packages/integrations/image/components/Picture.astro index ed2cfd49e..fb1f1e2bd 100644 --- a/packages/integrations/image/components/Picture.astro +++ b/packages/integrations/image/components/Picture.astro @@ -21,7 +21,7 @@ export interface RemoteImageProps extends Omit<PictureAttributes, 'src' | 'width export type Props = LocalImageProps | RemoteImageProps; -const { src, sizes, widths, aspectRatio, formats = ['avif', 'webp'], loading = 'lazy', decoding = 'eager', ...attrs } = Astro.props as Props; +const { src, sizes, widths, aspectRatio, formats = ['avif', 'webp'], loading = 'lazy', decoding = 'async', ...attrs } = Astro.props as Props; const { image, sources } = await getPicture({ loader, src, widths, formats, aspectRatio }); --- |