You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -250,6 +251,8 @@ var solidColorOverlayURL = imagekit.url({
250
251
251
252
##### Overlay Options
252
253
254
+
ImageKit supports various overlay types, including text, image, video, subtitle, and solid color overlays. Each overlay type has specific configuration options to customize the overlay appearance and behavior. To learn more about how overlays work, refer to the [ImageKit documentation](https://imagekit.io/docs/transformations#overlay-using-layers).
255
+
253
256
The table below outlines the available overlay configuration options:
254
257
255
258
| Option | Description | Example |
@@ -260,8 +263,8 @@ The table below outlines the available overlay configuration options:
260
263
| color | (For solidColor overlays) RGB/RGBA hex code or color name for the overlay color. |`color: "FF0000"`|
261
264
| encoding | Defines how the overlay input is encoded. Accepted values: `auto`, `plain`, `base64`. |`encoding: "auto"`|
262
265
| transformation | An array of transformation objects to style the overlay. <br> - [Text Overlay Transformations](#text-overlay-transformations) <br> - [Subtitle Overlay Transformations](#subtitle-overlay-transformations) <br> - Image and video overlays support most [transformations](#supported-transformations). <br> See [ImageKit docs](https://imagekit.io/docs/transformations#overlay-using-layers) for more details. |`transformation: [{ fontSize: 50 }]`|
263
-
| position | Sets the overlay’s position relative to the base asset. Accepts an object with `x`, `y`, or `focus` (e.g., `center`). |`position: { x: 10, y: 20 }` or `position: { focus: "center" }`|
264
-
| timing | (When base is a video) Defines when the overlay appears. Accepts an object with `start`, `duration`, and `end`properties (in seconds). |`timing: { start: 5, duration: 10 }`|
266
+
| position | Sets the overlay’s position relative to the base asset. Accepts an object with `x`, `y`, or `focus`. The `focus` value can be one of: `center`, `top`, `left`, `bottom`, `right`, `top_left`, `top_right`, `bottom_left`, or `bottom_right`.|`position: { x: 10, y: 20 }` or `position: { focus: "center" }`|
267
+
| timing | (For video base) Specifies when the overlay appears using `start`, `duration`, and `end` (in seconds); if both `duration` and `end` are set, `duration` is ignored.|`timing: { start: 5, duration: 10 }`|
265
268
266
269
267
270
##### Encoding Options
@@ -280,14 +283,6 @@ For image, video, and subtitle overlays:
280
283
281
284
Use `auto` for most cases to let the SDK optimize encoding, and use `plain` or `base64` when a specific encoding method is required.
|`auto`| SDK automatically selects between plain and base64 encoding based on the input. | Best for most cases when unsure or input is simple. |
288
-
|`plain`| SDK treats the input as plain text. | Use for inputs that are already URL-safe. |
289
-
|`base64`| SDK encodes the input using Base64 to ensure URL safety when special characters are present. | Use for complex inputs with characters that require encoding. |
290
-
291
286
##### Solid Color Overlay Transformations
292
287
293
288
| Option | Description | Example |
@@ -327,8 +322,6 @@ Below is a table describing these options:
327
322
|`fontOutline`| Specifies the font outline for subtitles. Requires the outline width (an integer) and the outline color (as a standard color name, RGB, or RGBA) separated by an underscore. Examples include `2_blue`, `2_A1CCDD`, or `2_A1CCDD50`. |`fontOutline: "2_blue"`|
328
323
|`fontShadow`| Specifies the font shadow for subtitles. Requires the shadow color (as a standard color name, RGB, or RGBA) and a shadow indent (an integer) separated by an underscore. Examples: `blue_2`, `A1CCDD_3`, or `A1CCDD50_3`. |`fontShadow: "blue_2"`|
329
324
330
-
For image and video overlay transformation options, refer to the [ImageKit Transformations Documentation](https://imagekit.io/docs/transformations).
0 commit comments