- Updated TypeScript types to allow string values for the
dprparameter in transformations, enabling support for arithmetic expressions and dynamic DPR values.
- Bug fix:
- Updated subtitle overlay transformation parameter from
l-subtitletol-subtitlesto align with API specification
- Updated subtitle overlay transformation parameter from
-
New transformation parameters added:
layerMode(lm): Control layer blending modes in overlay transformationsaiEdit(e-edit): AI-powered image editing transformationcolorReplace(cr): Replace specific colors in imagesdistort(e-distort): Apply distortion effects to images
-
Type definitions updated:
- Improved TypeScript types by synchronizing with the official Node.js SDK
- Enhanced type safety for transformation options, upload options, and responses
-
Documentation improvements:
- Added TypeScript versioning policy section to README
- Clarified how type definition improvements may be released in minor/patch versions
No runtime breaking changes from 5.1.x.
- New helper
getResponsiveImageAttributes()
Generates ready‑to‑usesrc,srcSet, andsizesfor responsive<img>tags (breakpoint pruning, DPR 1×/2×, custom breakpoints, no up‑scaling). - Added exports:
getResponsiveImageAttributes,GetImageAttributesOptions,ResponsiveImageAttributes.
No breaking changes from 5.0.x.
This version introduces major breaking changes, for usage examples, refer to the official documentation.
-
The package has been renamed from
imagekit-javascriptto@imagekit/javascript.
Please update your dependency references and import statements accordingly. -
The default-exported
ImageKitclass has been removed and replaced with named exports:buildSrcbuildTransformationStringupload- Error classes:
ImageKitInvalidRequestError,ImageKitAbortError,ImageKitUploadNetworkError,ImageKitServerError
Update your imports to use these named exports.
-
The
uploadmethod supportsAbortSignalfor canceling uploads.
Upload error handling has been revamped, andonProgresscallbacks are now supported.
Only the Promise-based syntax is supported. Callback style usage has been removed. -
Several internal interfaces (e.g.,
ImageKitOptions,IKResponse) have been updated or removed.
The upload options now require apublicKey, and a newSrcOptionsinterface has been introduced.
- Fixed overlay position x,y issue.
-
The default value for
transformationPositionis nowqueryinstead ofpath. This change enables wildcard cache purging to remove CDN cache for all generated transformations.Action Required:
If you're using thetransformationPositionparameter in theurlmethod and want to apply transformations in the path, you must now explicitly set the value topath. The default isquery. -
Removed the following deprecated parameters:
effectSharpen,effectUSM,effectContrast,effectGray,effectShadow,effectGradient, androtate.
- Native support for overlays has been added. See the README for usage examples.
- New AI-powered transformations are now supported:
aiRemoveBackground,aiUpscale,aiVariation,aiDropShadow,aiChangeBackground, and more.
(Introduced in version 3.1.0)
-
Overlay Syntax Update
In version 3.0.0, the old overlay syntax parameters for transformations (e.g.,oi,ot,obg, and others as detailed here) have been removed. These parameters are deprecated and will now return errors when used in URLs.Action Required:
Migrate to the new layers syntax which supports overlay nesting, offers improved positional control, and allows more transformations at the layer level. For a quick start, refer to the examples. Use therawtransformation parameter to implement this migration.
-
Authentication Process Update
Previously, client-side file uploads required the SDK to be initialized with both thepublicKeyandauthenticationEndpointto fetch security parameters (signature,token, andexpire).Action Required:
With version 2.0.0, you must now generate the security parameters (signature,token, andexpire) yourself, eliminating the need for theauthenticationEndpoint. When invoking the SDK's upload method, be sure to include these parameters along with other upload options. For further details, consult the documentation here.