Image Transformations

ImageKit.io can perform real-time transformations to deliver perfect images to the end users. These transformations can be performed by using the URL-based transformation parameters. The transformations can be as basic as manipulating the height and width of the image, to complex transformations like watermarking or smart cropping of your images.

Derive transformations from single master image With URL-based transformations, you can avoid the common practice of creating multiple image files of different sizes to use on your website. Instead, you can specify the output image's dimensions directly in the master image's URL. ImageKit.io then manipulates the images when requested by the end user and respects the parameters you specify in the URL to obtain the desired output image.

URL Based transformations

To perform transformation with ImageKit.io, specify the parameters within the URL. These transformations can be added to the URL as a path parameter or as a query parameter.

For example, the original image of 600x600 is resized to 300x300.

Original Image:https://ik.imagekit.io/demo/medium_cafe_B1iTdD0C.jpg

Resized Image:https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg

Transformations as a path parameter

Add the transformation parameters after the URL endpoint to perform the transformation. Every ImageKit.io parameter used in the path starts with tr:

Example:https://ik.imagekit.io/demo/tr:w-200,h-200/medium_cafe_B1iTdD0C.jpg

Transformations as a query parameter

Add the transformation parameters as a query parameter tr at the end of the URL to complete the transformation.

Example: https://ik.imagekit.io/demo/medium_cafe_B1iTdD0C.jpg?tr=w-200,h-200