diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e4336..a71b0a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.1.3 + +- Fixed missing `ref` prop support in the **Image** component. The component now properly accepts and forwards all Next.js Image props, including `ref`, by using `React.ComponentPropsWithRef` instead of the exported `ImageProps` type. + ## 2.1.2 - Bump `@imagekitio/javascript` dependency to `5.1.0`. diff --git a/package-lock.json b/package-lock.json index 34c28a4..1d90583 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@imagekit/next", - "version": "2.1.2", + "version": "2.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@imagekit/next", - "version": "2.1.2", + "version": "2.1.3", "license": "MIT", "dependencies": { "@imagekit/javascript": "^5.1.0" diff --git a/package.json b/package.json index 7b745b3..83b5f68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@imagekit/next", - "version": "2.1.2", + "version": "2.1.3", "description": "Next.js SDK for ImageKit.io which implements client-side upload and URL generation for use inside a next application.", "scripts": { "build:js": "rollup -c", diff --git a/src/components/Image.tsx b/src/components/Image.tsx index 5f4bba4..400fe19 100755 --- a/src/components/Image.tsx +++ b/src/components/Image.tsx @@ -1,10 +1,10 @@ import { buildSrc, type Transformation } from "@imagekit/javascript"; -import NextImage, { type ImageProps } from "next/image"; +import NextImage from "next/image"; import React, { useContext } from "react"; import type { SrcProps } from "../interface"; import { ImageKitContext } from "../provider/ImageKit"; -export type IKImageProps = Omit & SrcProps & { +export type IKImageProps = Omit, "src"> & SrcProps & { /** * Set to `false` to disable responsive srcset generation. By default, this is `true`. */