Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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<typeof NextImage>` instead of the exported `ImageProps` type.

## 2.1.2

- Bump `@imagekitio/javascript` dependency to `5.1.0`.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Image.tsx
Original file line number Diff line number Diff line change
@@ -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<ImageProps, "src"> & SrcProps & {
export type IKImageProps = Omit<React.ComponentPropsWithRef<typeof NextImage>, "src"> & SrcProps & {
/**
* Set to `false` to disable responsive srcset generation. By default, this is `true`.
*/
Expand Down