summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Caleb Jasik <calebjasik@jasik.xyz> 2023-05-11 07:40:53 -0500
committerGravatar GitHub <noreply@github.com> 2023-05-11 14:40:53 +0200
commitebb40f5cb093e9be5f856a98bf5ffd65a814218b (patch)
treef2135b2371f8d3747bec7ad92c33e758d92f05e9
parentc87d42e766d02db5352671cbf074dd637bdb23e0 (diff)
downloadastro-ebb40f5cb093e9be5f856a98bf5ffd65a814218b.tar.gz
astro-ebb40f5cb093e9be5f856a98bf5ffd65a814218b.tar.zst
astro-ebb40f5cb093e9be5f856a98bf5ffd65a814218b.zip
`@astrojs/image`: Add `fetchpriority` to `Picture` types (#7059)
* Add `fetchpriority` to `Picture` types * Add changeset
-rw-r--r--.changeset/purple-zebras-allow.md5
-rw-r--r--packages/integrations/image/components/index.ts4
2 files changed, 7 insertions, 2 deletions
diff --git a/.changeset/purple-zebras-allow.md b/.changeset/purple-zebras-allow.md
new file mode 100644
index 000000000..64649ca64
--- /dev/null
+++ b/.changeset/purple-zebras-allow.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/image': patch
+---
+
+Add `fetchpriority` to allowed `Picture` attributes in `@astrojs/image`
diff --git a/packages/integrations/image/components/index.ts b/packages/integrations/image/components/index.ts
index 3135e0e21..6c6d6910a 100644
--- a/packages/integrations/image/components/index.ts
+++ b/packages/integrations/image/components/index.ts
@@ -27,7 +27,7 @@ export interface ImageComponentRemoteImageProps extends TransformOptions, ImgHTM
export interface PictureComponentLocalImageProps
extends GlobalHTMLAttributes,
Omit<TransformOptions, 'src'>,
- Pick<ImgHTMLAttributes, 'loading' | 'decoding'> {
+ Pick<ImgHTMLAttributes, 'loading' | 'decoding' | 'fetchpriority'> {
src: ImageMetadata | Promise<{ default: ImageMetadata }>;
/** Defines an alternative text description of the image. Set to an empty string (alt="") if the image is not a key part of the content (it's decoration or a tracking pixel). */
alt: string;
@@ -39,7 +39,7 @@ export interface PictureComponentLocalImageProps
export interface PictureComponentRemoteImageProps
extends GlobalHTMLAttributes,
TransformOptions,
- Pick<ImgHTMLAttributes, 'loading' | 'decoding'> {
+ Pick<ImgHTMLAttributes, 'loading' | 'decoding' | 'fetchpriority'> {
src: string;
/** Defines an alternative text description of the image. Set to an empty string (alt="") if the image is not a key part of the content (it's decoration or a tracking pixel). */
alt: string;