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
src/components/ImageFigure.astro:23 passes src and alt to Astro's <Image> but no width or height. Astro's Image component requires explicit dimensions when the source is a remote string URL (only inferred for local imports).
astro check error
src/components/ImageFigure.astro:23:4 - error ts(2322): Type '{ src: string | ImageMetadata; alt: string; "class:list": (string | undefined)[]; }' is not assignable to type 'IntrinsicAttributes & Props'.
Type '{ src: string | ImageMetadata; alt: string; "class:list": (string | undefined)[]; }' is not assignable to type 'IntrinsicAttributes & { [x: `data-${string}`]: any; title?: string | null | undefined; alt: string | null; about?: string | null | undefined; class?: string | null | undefined; ... 207 more ...; inferSize?: false | undefined; }'.
Type '{ src: string | ImageMetadata; alt: string; "class:list": (string | undefined)[]; }' is missing the following properties from type '{ [x: `data-${string}`]: any; title?: string | null | undefined; alt: string | null; about?: string | null | undefined; class?: string | null | undefined; 'class:list'?: string | Record<string, boolean> | Record<...> | Iterable<...> | Iterable<...> | undefined; ... 206 more ...; inferSize?: false | undefined; }': width, height
23 <Image
~~~~~
Suggested fix
Decide what ImageFigure is meant to support:
If only local images (ImageMetadata): narrow the src prop type so <Image> can infer dimensions.
If remote images are intended: add width and height props (required) to ImageFigure's Props and forward them to <Image>.
If you want callers to optionally provide dimensions: use <img> directly instead of <Image> for the remote case.
Acceptance criteria
Error clears.
All current callers of ImageFigure still render correctly (grep for ImageFigure usages).
If dimensions are now required props, callers updated.
ImageFiguremissing requiredwidth/heightLabels:
bug,typesEstimated PR size: 1 file
Note
Ticket description was generated using Claude Code. Review before starting on a fix.
Note
The following issue adds support for
npm run astro:checkSummary
src/components/ImageFigure.astro:23passessrcandaltto Astro's<Image>but nowidthorheight. Astro'sImagecomponent requires explicit dimensions when the source is a remotestringURL (only inferred for local imports).astro checkerrorSuggested fix
Decide what
ImageFigureis meant to support:ImageMetadata): narrow thesrcprop type so<Image>can infer dimensions.widthandheightprops (required) toImageFigure's Props and forward them to<Image>.<img>directly instead of<Image>for the remote case.Acceptance criteria
ImageFigurestill render correctly (grep forImageFigureusages).