Skip to content

Commit 892d31c

Browse files
committed
docs: update README to enhance Table of Contents and add raw transformations parameter
1 parent 3794fe5 commit 892d31c

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

README.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,36 @@ For additional details, refer to the [ImageKit REST API documentation](https://i
1010

1111
If you are looking to integrate file uploads in browsers, use one of our [frontend SDKs](https://imagekit.io/docs/quick-start-guides#front-end).
1212

13+
## Table of Contents
14+
15+
- [Installation](#installation)
16+
- [Usage](#usage)
17+
- [Request & Response types](#request--response-types)
18+
- [File uploads](#file-uploads)
19+
- [URL generation](#url-generation)
20+
- [Basic URL generation](#basic-url-generation)
21+
- [URL generation with transformations](#url-generation-with-transformations)
22+
- [URL generation with image overlay](#url-generation-with-image-overlay)
23+
- [URL generation with text overlay](#url-generation-with-text-overlay)
24+
- [URL generation with multiple overlays](#url-generation-with-multiple-overlays)
25+
- [Signed URLs for secure delivery](#signed-urls-for-secure-delivery)
26+
- [Using Raw parameter for custom transformations](#using-raw-parameter-for-custom-transformations)
27+
- [Authentication parameters for client-side uploads](#authentication-parameters-for-client-side-uploads)
28+
- [Webhook verification](#webhook-verification)
29+
- [Verifying webhook signatures](#verifying-webhook-signatures)
30+
- [Handling errors](#handling-errors)
31+
- [Retries](#retries)
32+
- [Timeouts](#timeouts)
33+
- [Advanced Usage](#advanced-usage)
34+
- [Accessing raw Response data (e.g., headers)](#accessing-raw-response-data-eg-headers)
35+
- [Logging](#logging)
36+
- [Making custom/undocumented requests](#making-customundocumented-requests)
37+
- [Customizing the fetch client](#customizing-the-fetch-client)
38+
- [Fetch options](#fetch-options)
39+
- [Semantic versioning](#semantic-versioning)
40+
- [Requirements](#requirements)
41+
- [Contributing](#contributing)
42+
1343
## Installation
1444

1545
```sh
@@ -264,6 +294,26 @@ const permanentSignedUrl = client.helper.buildSrc({
264294
// Result: URL with signature parameter (?ik-s=signature)
265295
```
266296

297+
### Using Raw parameter for custom transformations
298+
299+
ImageKit frequently adds new transformation parameters that might not yet be documented in the SDK. You can use the `raw` parameter to access these features or create custom transformation strings:
300+
301+
```ts
302+
// Using raw parameter for custom transformations
303+
const customTransformUrl = client.helper.buildSrc({
304+
urlEndpoint: 'https://ik.imagekit.io/your_imagekit_id',
305+
src: '/path/to/image.jpg',
306+
transformation: [
307+
{
308+
width: 400,
309+
height: 300,
310+
raw: 'something-new', // Custom contrast transformation
311+
},
312+
],
313+
});
314+
// Result: https://ik.imagekit.io/your_imagekit_id/path/to/image.jpg?tr=w-400,h-300,something-new
315+
```
316+
267317
## Authentication parameters for client-side uploads
268318

269319
Generate authentication parameters for secure client-side file uploads:
@@ -595,8 +645,6 @@ const client = new ImageKit({
595645
});
596646
```
597647

598-
## Frequently Asked Questions
599-
600648
## Semantic versioning
601649

602650
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

0 commit comments

Comments
 (0)