1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-04-21 12:05:30 -04:00

fix custom image width/height when passed in as strings

This commit is contained in:
2022-01-24 11:37:12 -05:00
parent e5b862508c
commit e91595c8bf
6 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ const CustomImage = ({
}: NextImageProps) => {
// passed directly into next/image: https://nextjs.org/docs/api-reference/next/image
const imageProps: Partial<NextImageProps> = {
width,
height,
width: typeof width === "string" ? parseInt(width) : width,
height: typeof height === "string" ? parseInt(height) : height,
layout: "intrinsic",
alt: alt || "",
quality: quality || 65,