diff --git a/packages/integrations/image/components/Picture.astro b/packages/integrations/image/components/Picture.astro index fb1f1e2bd..0de8c8e33 100644 --- a/packages/integrations/image/components/Picture.astro +++ b/packages/integrations/image/components/Picture.astro @@ -4,14 +4,14 @@ import loader from 'virtual:image-loader'; import { getPicture } from '../src/get-picture.js'; import type { ImageAttributes, ImageMetadata, OutputFormat, PictureAttributes, TransformOptions } from '../src/types.js'; -export interface LocalImageProps extends Omit, Omit, Omit { +export interface LocalImageProps extends Omit, Omit { src: ImageMetadata | Promise<{ default: ImageMetadata }>; sizes: HTMLImageElement['sizes']; widths: number[]; formats?: OutputFormat[]; } -export interface RemoteImageProps extends Omit, TransformOptions, Omit { +export interface RemoteImageProps extends TransformOptions, Omit { src: string; sizes: HTMLImageElement['sizes']; widths: number[]; @@ -26,10 +26,10 @@ const { src, sizes, widths, aspectRatio, formats = ['avif', 'webp'], loading = ' const { image, sources } = await getPicture({ loader, src, widths, formats, aspectRatio }); --- - + {sources.map(attrs => ( ))} - +