Getting started

Integration & migration

Image & video API

DAM user guide

API overview

Account

JavaScript ImageKit SDK

Learn how to use the ImageKit JavaScript SDK for URL generation and file uploads.


The ImageKit JavaScript SDK provides easy-to-use utility functions for generating optimized image and video URLs, applying a wide range of transformations (resize, crop, overlays, effects, and even AI-powered enhancements), and uploading files. It is designed specifically for browser-based environments. If you are looking to use ImageKit on Node.js, please refer to the ImageKit Node.js SDK.

The SDK is lightweight, does not require any dependencies, and has first-class TypeScript support. You can view the source code on GitHub.

Installation and Setup

Install the SDK via npm or yarn:

Copy
npm install @imagekit/javascript
# or
yarn add @imagekit/javascript

You can also include the SDK directly in your HTML using a script tag. It is recommended to load a specific version to avoid unexpected breaking changes:

Copy
<script src="https://unpkg.com/@imagekit/javascript@5.0.0/dist/imagekit.min.js"></script>

For environments with module bundlers (e.g., webpack, Rollup) or ES modules, simply import the functions:

Copy
import { buildSrc, buildTransformationString, upload } from '@imagekit/javascript';

The JavaScript SDK exports the following:

Utility functions

  • buildSrc - To generate complete URLs for images and videos with transformations.
  • buildTransformationString - To generate transformation strings so that you can use them in your own URL generation logic.
  • upload - To upload files to ImageKit.

Error classes for upload error handling

  • ImageKitInvalidRequestError - For invalid requests.
  • ImageKitAbortError - For aborted uploads.
  • ImageKitUploadNetworkError - For network errors during upload.
  • ImageKitServerError - For server-side errors.

Type definitions

The SDK provides TypeScript type definitions for all the parameters and options used in the SDK. This includes types for SrcOptions, UploadOptions, UploadResponse, and Transformation.

URL Generation

The SDK provides two helper functions:

  • buildSrc - To generate complete URLs for images and videos with transformations.
  • buildTransformationString - To generate transformation strings so that you can use them in your own URL generation logic.

buildSrc Parameters

The buildSrc function accepts an options object with the following parameters:

Parameter Description and Example

urlEndpoint
(Required)

The base URL endpoint from your ImageKit dashboard.

Example: https://ik.imagekit.io/your_imagekit_id

src
(Required)

A relative or absolute path to the image or video.

  • If a relative path is provided, it is appended to the urlEndpoint.
  • If an absolute path is provided, it is used as-is and the urlEndpoint is ignored.
  • Do not include query parameters directly in the src. Use the queryParameters prop instead.
  • When using a web proxy, you can pass the full URL and prepend it with a /. For example - /https://example.com/image.jpg.

Examples:
Relative - /default-image.jpg
Absolute - https://example.com/image.jpg
Web Proxy - /https://example.com/image.jpg

transformation

An array of transformation objects. Each object can include properties like width, height, rotation, overlays, and advanced effects.

Example: [ { width: 300, height: 300 } ]

See all supported transformation options and how to handle unsupported transformations.

queryParametersAn object with additional query parameters to append to the URL.
Example: { v: 2 }
transformationPositionSpecifies whether the transformation string is included in the URL path or as a query parameter. Defaults to "query".
Example: "query" or "path"

buildTransformationString Parameters

The buildTransformationString accepts an array of transformation objects and returns the transformation string.

Copy
import { buildTransformationString } from '@imagekit/javascript';
const transformationString = buildTransformationString([
  { width: 300, height: 300 },
  { overlay: { type: "text", text: "Hello World" } }
]);
console.log(transformationString);
// Expected output: "w-300,h-300:l-text,i-Hello%20World,l-end"

Height and Width Transformations

ImageKit allows you to resize images and videos on-the-fly using the width and height parameters.

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/photo.jpg",
  transformation: [{ width: 300, height: 300 }]
});

Chained Transformations

You can chain multiple transformations together by passing an array of transformation objects. Each object can specify different properties, such as width, height, cropping, overlays, and effects. See chained transformations for more details.

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/photo.jpg",
  transformation: [
    { width: 400, height: 300 },
    { rotation: 90 }
  ]
});

Adding Overlays

You can add overlays to images and videos. The overlay can be a text, image, video, or subtitle.

Besides the overlay type, you can also specify the position, size, and other properties of the overlay. Check the overlay options for more details.

Image Overlay

Copy
// Image overlay example:
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.jpg",
  transformation: [
    { 
      overlay: { 
        type: "image", 
        input: "logo.png"
      } 
    }
  ]
});

You can further transform the overlay image independently of the base image by adding additional transformation parameters. For example, to resize the overlay image:

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.jpg",
  transformation: [
    { 
      overlay: { 
        type: "image", 
        input: "logo.png", 
        transformation: [
          { width: 100, height: 100 }
        ]
      } 
    }
  ]
});

Image overlays support a wide range of transformations. Check reference for a complete list of transformations supported on image overlays.

Solid Color Overlay

You can add a solid color overlay to images and videos.

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.jpg",
  transformation: [
    { 
      overlay: { 
        type: "solidColor", 
        color: "FF0000" // Required
      } 
    }
  ]
});

You can also specify the width, height, and other properties of the solid color overlay. For example:

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.jpg",
  transformation: [
    { 
      overlay: { 
        type: "solidColor", 
        color: "FF0000", // Required
        transformation: [
          { width: 100, height: 100 }
        ]
      } 
    }
  ]
});

For more options related to styling the solid color overlay, check the solid color overlay transformations section.

Text Overlay

You can add text overlays to images and videos.

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.jpg",
  transformation: [
    { 
      overlay: { type: "text", text: "Hello, ImageKit!" } 
    }
  ]
});

You can also specify the font size, color, and other properties of the text overlay. For example:

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.jpg",
  transformation: [
    { 
      overlay: { 
        type: "text", 
        text: "Hello, ImageKit!", 
        transformation: [
          { fontSize: 20, fontColor: "FF0000" }
        ]
      } 
    }
  ]
});

Check the text overlay transformations section for more options related to styling the text.

Video Overlay

You can add video overlays on videos only.

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.mp4",
  transformation: [
    { 
      overlay: { 
        type: "video", 
        input: "video.mp4"
      } 
    }
  ]
});

Additionally, you can specify the start and end time for the overlay video. For example:

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.mp4",
  transformation: [
    { 
      overlay: { 
        type: "video", 
        input: "video.mp4", 
        timing: { start: 5, duration: 10 } // Overlay appears at 5 seconds and lasts for 10 seconds
      } 
    }
  ]
});

You can also independently transform the overlay video. For example, to resize the overlay video:

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.mp4",
  transformation: [
    { 
      overlay: { 
        type: "video", 
        input: "video.mp4", 
        transformation: [
          { width: 100, height: 100 } // Resize overlay video independently
        ] 
      } 
    }
  ]
});

All supported video transformations can also be applied to overlay videos.

If you're overlaying an image on a base video, refer to this list for all the transformations supported on image overlays.

Subtitle Overlay

You can add subtitle overlays on videos.

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/background.mp4",
  transformation: [
    { 
      overlay: { type: "subtitle", input: "subtitle.srt" } 
    }
  ]
});

The subtitle overlay can be styled with various properties such as font size, color, and outline. See the Subtitle Overlay Transformations section for all styling options.

Background Removal Using AI

You can use the aiRemoveBackground transformation to remove the background from images. This is particularly useful for e-commerce applications.

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/photo.jpg",
  transformation: [{ aiRemoveBackground: true }]
});

ImageKit supports multiple AI-powered transformations, like upscaling, generative fill, and more. You can use these transformations to enhance your images without needing to manually edit them. Check the AI Transformations section for more details.

More examples:

Copy
// Drop shadow using AI
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/photo.jpg",
  transformation: [{ aiDropShadow: true }]
});

// Upscale a small image using AI
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/photo.jpg",
  transformation: [{ aiUpscale: true }]
});

Arithmetic Expressions

You can use arithmetic expressions to dynamically compute transformation values. For example, to set the width to half of the original image width:

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/photo.jpg",
  transformation: [{ width: "iw_div_2" }]
});

Check out the Arithmetic Expressions reference for more examples and details.

Uploading Files

The upload() function enables you to upload files to ImageKit using upload V1 API. It accepts an options object and returns a promise that resolves with an upload response. The SDK JSON stringifies certain parameters before sending them to the server as expected by the API. If the SDK does not support a parameter, it is added as-is in the request. Check the API documentation for more details.

upload() Parameters

The upload() function accepts a JSON object with the following parameters:

Option Description and Example
file
(Required)
The file content to be uploaded. Accepts binary data, a base64-encoded string, or a URL. Typically used with a File or Blob in the browser. Example: file: fileInput.files[0]
fileName
(Required)
The name to assign to the uploaded file. Supports alphanumeric characters, dot, underscore, and dash. Any other character is replaced with _. Example: fileName: "myImage.jpg"
signature
(Required)
The HMAC-SHA1 digest of the concatenation of "token + expire". The signing key is your ImageKit private API key. Must be computed on the server side. Example: signature: "generated_signature"

token
(Required)

A unique value to identify and prevent replays. Typically a UUID (e.g., version 4). Example: token: "unique_upload_token"

Check the signature generation section for more details on how to generate this value.

expire
(Required)

A Unix timestamp in seconds, less than 1 hour in the future. Example: expire: 1616161616

Check the signature generation section for more details on how to generate this value.

publicKey
(Required)

The public API key for your ImageKit account. This is used to identify the account making the upload request. Example: publicKey: "your_public_api_key"

Check the signature generation section for more details on how to generate this value.

onProgressA callback function to track the upload progress. It receives an event object with loaded and total properties. Example: onProgress: (event) => console.log(event.loaded, event.total) This is useful for showing upload progress to the user.
abortSignalAn optional AbortSignal object to abort the upload request. If the signal is already aborted, the upload will fail immediately. You can create an AbortController instance and pass its signal to the upload() function.
useUniqueFileNameBoolean flag to automatically generate a unique filename if set to true. Defaults to true. If false, the image is uploaded with the provided filename, replacing any existing file with the same name. Example: useUniqueFileName: true
folderThe folder path where the file will be stored, e.g., "/images/folder/". If the path doesn't exist, it is created on-the-fly. Example: folder: "/images/uploads"
isPrivateFileBoolean to mark the file as private, restricting access to the original file URL. A private file requires signed URLs or named transformations for access. Defaults to false. Example: isPrivateFile: false
tagsOptionally set tags on the uploaded file. Can be a comma-separated string or an array of tags. Example: tags: "summer,holiday" or tags: ["summer","holiday"]
customCoordinatesA string in "x,y,width,height" format that defines the region of interest in an image (top-left coords and area size). Example: customCoordinates: "10,10,100,100"
responseFieldsA comma-separated or array-based set of fields to return in the upload response. Example: responseFields: "tags,customCoordinates"
extensionsAn array of extension objects to apply to the image, e.g., background removal, auto-tagging, etc. Example: extensions: [{ name: "auto-tagging" }]
webhookUrlA webhook URL to receive the final status of any pending extensions once they've completed processing. Example: webhookUrl: "https://example.com/webhook"
overwriteFileDefaults to true. If false, and "useUniqueFileName" is also false, the API immediately fails if a file with the same name/folder already exists. Example: overwriteFile: true
overwriteAITagsDefaults to true. If true, and an existing file is found at the same location, its AITags are removed. Set to false to keep existing AITags. Example: overwriteAITags: true
overwriteTagsDefaults to true. If no tags are specified in the request, existing tags are removed from overwritten files. Setting to false has no effect if the request includes tags. Example: overwriteTags: true
overwriteCustomMetadataDefaults to true. If no customMetadata is specified in the request, existing customMetadata is removed from overwritten files. Setting to false has no effect if the request specifies customMetadata. Example: overwriteCustomMetadata: true
customMetadataA stringified JSON or an object containing custom metadata fields to store with the file. Custom metadata fields must be pre-defined in your ImageKit configuration. Example: customMetadata: {author: "John Doe"}
transformationDefines pre and post transformations to be applied to the file during upload. The SDK enforces certain validation rules for pre/post transformations. Example: transformation: { pre: "w-200,h-200", post: [...] }
xhrAn optional XMLHttpRequest instance for the upload. The SDK merges it with its own logic to handle progress events, etc. Example: xhr: new XMLHttpRequest()
checksA string specifying the checks to be performed server-side before uploading to the media library, e.g., size or mime type checks. Example: checks: "file.size' < '1MB'"

Upload Example and Error Handling

The .upload function requires you to send token, signature, expire and publicKey parameters. Check the signature generation section for more details on how to generate these values.

Copy
import { upload, ImageKitInvalidRequestError, ImageKitAbortError, ImageKitUploadNetworkError, ImageKitServerError } from '@imagekit/javascript';

const fileInput = document.getElementById('fileInput');
const abortController = new AbortController(); // You can abort the upload using abortController.abort();

// Get required token, signature, and expire values from your server. Check the signature generation below for more details.

fileInput.addEventListener('change', async (e) => {
  const file = e.target.files[0];
  const uploadOptions = {
    file,
    fileName: file.name,
    token: "your_upload_token", // Check signature generation section for more details
    signature: "your_generated_signature",
    expire: Math.floor(Date.now() / 1000) + 3600,
    publicKey: "your_public_key",
    onProgress: (event) => {
      console.log(`Progress: ${event.loaded}/${event.total}`);
    },
    abortSignal: abortController.signal
  };
  
  try {
    const response = await upload(uploadOptions);
    console.log("Upload successful:", response);
  } catch (error) {
    if (error instanceof ImageKitAbortError) {
      // You aborted the upload
      console.error("Upload aborted:", error.reason);
    } else if (error instanceof ImageKitInvalidRequestError) {
      // You made an invalid request
      console.error("Invalid request:", error.message);
    } else if(error instanceof ImageKitUploadNetworkError) {
      // Random network error on client side
      console.error("Network error:", error.message);
    } else if (error instanceof ImageKitServerError) {
      // Error on ImageKit server side (5xx). Usually rare and temporary.
      console.error("Server error:", error.message);
    } else {
      // Any other error. You love JavaScript, right?
      console.error("Upload error:", error);
    }
  }
});

Signature Generation

The .upload function requires you to send token, signature, and expire parameters. These are used to authenticate the upload request. These values should be generated in your secure backend server and passed to the client. The SDK does not generate these values for you. However, all ImageKit SDKs (Java, PHP, Node.js, Python, Ruby, etc.) provide methods to generate these values. You can use any of these SDKs to generate the signature and token.

Check the upload API documentation for more details on how to generate the signature and token.

Never expose your private API key in the client-side code. Always generate the token, signature, and expire values on your server and pass them to the client securely.

Sample code to generate the signature and token using Node.js SDK:

Copy
var ImageKit = require("imagekit"); // Node.js SDK

var imagekit = new ImageKit({
    publicKey : "your_public_api_key",
    privateKey : "your_private_api_key",
    urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/"
});

var { token, expire, signature } = imagekit.getAuthenticationParameters();
console.log({token, expire, signature});

Supported Transformations

The SDK gives a name to each transformation parameter (e.g. height maps to h, width maps to w). If the property does not match any of the following supported options, it is added as is in the URL.

If you want to generate transformations without any modifications, use the raw parameter. For example, the SDK doesn't provide a nice way to write conditional transformations, so you can use the raw parameter to add them as is.

Check transformation documentation for a complete reference on all transformations supported by ImageKit.

Transformation NameURL Parameter
widthw
heighth
aspectRatioar
qualityq
aiRemoveBackgrounde-bgremove (ImageKit powered)
aiRemoveBackgroundExternale-removedotbg (Using third party)
aiUpscalee-upscale
aiRetouche-retouch
aiVariatione-genvar
aiDropShadowe-dropshadow
aiChangeBackgrounde-changebg
cropc
cropModecm
xx
yy
xCenterxc
yCenteryc
focusfo
formatf
radiusr
backgroundbg
borderb
rotationrt
blurbl
namedn
dprdpr
progressivepr
losslesslo
trimt
metadatamd
colorProfilecp
defaultImagedi
originalorig
videoCodecvc
audioCodecac
grayscalee-grayscale
contrastStretche-contrast
shadowe-shadow
sharpene-sharpen
unsharpMaske-usm
gradiente-gradient
flipfl
opacityo
zoomz
pagepg
startOffsetso
endOffseteo
durationdu
streamingResolutionssr
overlayGenerates the correct layer syntax for image, video, text, subtitle, and solid color overlays.
rawThe string provided in raw will be added in the URL as is.

Handling Unsupported Transformations

If you specify a transformation parameter that is not explicitly supported by the SDK, it is added “as-is” in the generated URL. This provides flexibility for using new or custom transformations without waiting for an SDK update.

For example:

Copy
buildSrc({
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  src: "/photo.jpg",
  transformation: [
    { unsupportedTransformation: "value" }
  ]
});
// Output: https://ik.imagekit.io/your_imagekit_id/photo.jpg?tr=unsupportedTransformation-value

Overlay Reference

This SDK provides overlay as a transformation parameter. The overlay can be a text, image, video, subtitle, or solid color.

Overlays in ImageKit are applied using layers, allowing you to stack multiple overlays on top of each other. Each overlay can be styled and positioned independently. For more details, refer to the layer documentation.

The SDK automatically generates the correct layer syntax for image, video, text, subtitle, and solid color overlays. You can also specify the overlay position, size, and other properties.

The table below outlines the available overlay configuration options:

Option Description and Example
type
(Required)
Specifies the type of overlay. Supported values: text, image, video, subtitle, solidColor. Example: type: "text"
text
(Required for text overlays)
The text content to display. Example: text: "ImageKit"
input
(Required for image, video, or subtitle overlays)
Relative path to the overlay asset. Example: input: "logo.png" or input: "overlay-video.mp4"
color
(Required for solidColor overlays)
RGB/RGBA hex code or color name for the overlay color. Example: color: "FF0000"
encodingAccepted values: auto, plain, base64. Check this for more details. Example: encoding: "auto"
transformationAn array of transformation objects to style the overlay independently of the base asset. Each overlay type has its own set of supported transformations.
  • For example, for text overlays, you can specify fontSize, fontColor, background, etc. Example: transformation: [{ fontSize: 20, fontColor: "FF0000" }]. Check out the text overlay transformations section for more options.
  • For image overlays, you can specify width, height, radius, etc. Example: transformation: [{ width: 100, height: 100 }]. Check reference for complete list of transformations supported on image overlays.
  • For video overlays, you can specify width, height, rotation, etc. Example: transformation: [{ width: 100, height: 100 }]. Check reference for complete list of transformations supported on video overlays.
  • For subtitle overlays, you can specify fontSize, fontColor, background, etc. Example: transformation: [{ fontSize: 20, fontColor: "FF0000" }]. Check out the subtitle overlay transformations section for more options.
  • For solid color overlays, you can specify width, height, radius, etc. Example: transformation: [{ width: 100, height: 100 }]. Check out the solid color overlay transformations section for more options.
positionSets the overlay’s position relative to the base asset. Accepts an object with x, y, or focus. Example: position: { x: 10, y: 20 } or position: { focus: "center" }
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. Example: timing: { start: 5, duration: 10 }

Encoding Options

Overlay encoding options define how the overlay input is converted for URL construction. When set to auto, the SDK automatically determines whether to use plain text or Base64 encoding based on the input content.

For text overlays:

  • If auto is used, the SDK checks the text overlay input: if it is URL-safe, it uses the format i-{input} (plain text); otherwise, it applies Base64 encoding with the format ie-{base64_encoded_input}.
  • You can force a specific method by setting encoding to plain (always use i-{input}) or base64 (always use ie-{base64}).
  • Note: In all cases, the text is percent-encoded to ensure URL safety.

For image, video, and subtitle overlays:

  • The input path is processed by removing any leading/trailing slashes and replacing inner slashes with @@ when plain is used.
  • Similarly, if auto is used, the SDK determines whether to apply plain text or Base64 encoding based on the characters present.
  • For explicit behavior, use plain or base64 to enforce the desired encoding.

Use auto for most cases to let the SDK optimize encoding, and use plain or base64 when a specific encoding method is required.

Solid Color Overlay Transformations

OptionDescriptionExample
widthSpecifies the width of the solid color overlay block (in pixels or as an arithmetic expression).width: 100
heightSpecifies the height of the solid color overlay block (in pixels or as an arithmetic expression).height: 50
radiusSpecifies the corner radius of the solid color overlay block or shape. Can be a number or "max" for circular/oval shapes.radius: "max"
alphaSpecifies the transparency level of the solid color overlay. Supports integers from 1 (most transparent) to 9 (least transparent).alpha: 5

Text Overlay Transformations

OptionDescriptionExample
widthSpecifies the maximum width (in pixels) of the overlaid text. The text wraps automatically, and arithmetic expressions are supported (e.g., bw_mul_0.2 or bh_div_2).width: 400
fontSizeSpecifies the font size of the overlaid text. Accepts a numeric value or an arithmetic expression.fontSize: 50
fontFamilySpecifies the font family of the overlaid text. Choose from the supported fonts or provide a custom font.fontFamily: "Arial"
fontColorSpecifies the font color of the overlaid text. Accepts an RGB hex code, an RGBA code, or a standard color name.fontColor: "FF0000"
innerAlignmentSpecifies the inner alignment of the text when it doesn’t occupy the full width. Supported values: left, right, center.innerAlignment: "center"
paddingSpecifies the padding around the text overlay. Can be a single integer or multiple values separated by underscores; arithmetic expressions are accepted.padding: 10
alphaSpecifies the transparency level of the text overlay. Accepts an integer between 1 and 9.alpha: 5
typographySpecifies the typography style of the text. Supported values: b for bold, i for italics, and b_i for bold with italics.typography: "b"
backgroundSpecifies the background color of the text overlay. Accepts an RGB hex code, an RGBA code, or a color name.background: "red"
radiusSpecifies the corner radius of the text overlay. Accepts a numeric value or max for circular/oval shape.radius: "max"
rotationSpecifies the rotation angle of the text overlay. Accepts a numeric value for clockwise rotation or a string prefixed with N for counterclockwise rotation.rotation: 90
flipSpecifies the flip option for the text overlay. Supported values: h, v, h_v, v_h.flip: "h"
lineHeightSpecifies the line height for multi-line text. Accepts a numeric value or an arithmetic expression.lineHeight: 20

Subtitle Overlay Transformations

OptionDescriptionExample
backgroundSpecifies the subtitle background color using a standard color name, RGB color code, or RGBA color code.background: "blue"
fontSizeSets the font size of subtitle text.fontSize: 16
fontFamilySets the font family of subtitle text.fontFamily: "Arial"
colorSpecifies the font color of subtitle text using standard color name, RGB, or RGBA color code.color: "FF0000"
typographySets the typography style of subtitle text. Supported values: b, i, b_i.typography: "b"
fontOutlineSpecifies the font outline for subtitles. Requires an outline width and color separated by an underscore.fontOutline: "2_blue"
fontShadowSpecifies the font shadow for subtitles. Requires shadow color and indent separated by an underscore.fontShadow: "blue_2"