diff --git a/packages/next/client/image.tsx b/packages/next/client/image.tsx
index 184c1a84af3530a..69ad812509c68a7 100644
--- a/packages/next/client/image.tsx
+++ b/packages/next/client/image.tsx
@@ -29,8 +29,8 @@ type ImageProps = Omit<
loading?: LoadingValue
unoptimized?: boolean
} & (
- | { width: number; height: number; unsized?: false }
- | { width?: number; height?: number; unsized: true }
+ | { width: number | string; height: number | string; unsized?: false }
+ | { width?: number | string; height?: number | string; unsized: true }
)
const imageData: ImageData = process.env.__NEXT_IMAGE_OPTS as any
@@ -229,16 +229,18 @@ export default function Image({
className = className ? className + ' __lazy' : '__lazy'
}
- // No need to add preloads on the client side--by the time the application is hydrated,
- // it's too late for preloads
- const shouldPreload = priority && typeof window === 'undefined'
-
let divStyle: React.CSSProperties | undefined
let imgStyle: React.CSSProperties | undefined
let wrapperStyle: React.CSSProperties | undefined
- if (typeof height === 'number' && typeof width === 'number' && !unsized) {
- //
Hello World
-This is the index page
Hello World