bg) in the URL.
fo-lefttransformation to our image. Now, all the padding is on the right of the image, while the image itself is on the left (determined by the value of focus(fo) parameter).
fo-toptransformation to our image. Now, all the padding is on the bottom of the image, while the image itself is on the top (determined by the value of focus(fo) parameter).
foparameters are -
yto determine the position of the top-left corner from where the extract would begin.
ycto determine the position of the center of the image which would be extracted.
xycoordinates to focus on a particular area, you can also specify the focus area in an image while uploading the image or from the media library and then use
fo-customtransformation in the image URL. ImageKit will then utilize the custom crop area specified with the image for all crop operations. This custom focus mode works for both the extract crop and the default maintain ratio crop strategy.
Orientationvalue in the image metadata. This could result in unexpected behavior when using,
cm-extract. In that case, you will have to adjust the values of
yto accommodate for the oriented image.
cm-pad_extracttransformation parameter in the URL.
foparameter also have two additional options that intelligently detect the most important part of an image to create thumbnails i.e.
face. Let's see them in action:
fo-autoparameter in the URL transformation parameters.
80(can be managed from image settings in dashboard)
auto(from dashboard settings)
blspecifies the radius of the Gaussian Blur that is to be applied. Higher the value, larger the radius of Gaussian Blur. Possible values include integers between
dprparameter can only be used when either the height or width of the desired output image is specified. If the output image's height or width after considering the specified DPR is less than 1px or greater than 5000px, the value of DPR is not considered and the height or width used in the URL is used. Possible Values-
thumbnailfor a transformation string -
tr:w-100,h-100,c-at_max,fo-autoand is used like: https://ik.imagekit.io/demo/img/tr:n-media_library_thumbnail/default-image.jpg
If the default image is nested inside multiple folders, then you need to specify the entire default image path in this parameter. Replace
@@in the default image path. For example, if the default image is accessible on
https://ik.imagekit.io/demo/path/to/image.jpg, then the
diparameter should be
[email protected]@[email protected]@[email protected]@image.jpg.
t-true|NumberPossible Values include
trueand integer values between
99that specify the threshold level for considering a particular pixel as "background".
true. This is because with a higher value specified for trim, more and more pixels are considered as similar and redundant and hence get removed.
false(from the dashboard)
false(from the dashboard)
max. This parameter is applied after resizing the original image, if defined.
99, which is used to indicate the opacity level of the background.
00represents an opacity level of 0.00,
01represents opacity level 0.01, and so on. Default Value - Black 00000
origand set the value to
true. If there are any other transformation parameters specified along with
orig-true, then those get ignored.
ik-attachment=truequery param in the URL to download the file as an attachment rather than viewing it inline in the web browser.
content-dispositionheader in the response with the value
attachmentalong with the file name.