diff --git a/components/Image.tsx b/components/Image.tsx index a4aea94..a4f3975 100644 --- a/components/Image.tsx +++ b/components/Image.tsx @@ -47,6 +47,11 @@ const Image = ( "/api/images", ); + const hasDimensions = typeof props.width === "number" && + typeof props.height === "number"; + const sizes = hasDimensions ? "" : responsiveAttributes.sizes; + const srcset = hasDimensions ? "" : responsiveAttributes.srcset; + return ( ; }, ) => { diff --git a/islands/Search.tsx b/islands/Search.tsx index fc3c540..ee43eb6 100644 --- a/islands/Search.tsx +++ b/islands/Search.tsx @@ -55,8 +55,8 @@ const SearchResultImage = ({ src }: { src: string }) => { return ( preview image