publicKey
and privateKey
parameters are required as these would be used for all ImageKit API, server-side upload, and generating token for client-side file upload. You can get these parameters from the developer section in your ImageKit dashboard - https://imagekit.io/dashboard/developer/api-keys.urlEndpoint
is also a required parameter. You can get the value of URL-endpoint from your ImageKit dashboard - https://imagekit.io/dashboard/url-endpoints.$imageKit->url()
method accepts the following parameters./path/to/image.jpg
. Either the path
or src
parameter needs to be specified for URL generation.https://ik.imagekit.io/your_imagekit_id/endpoint/path/to/image.jpg
. Either the path
or src
parameter needs to be specified for URL generation.path
which places the transformation string as a path parameter in the URL. It can also be specified as query
, which adds the transformation string as the query parameter tr
in the URL. If you use the src
parameter to create the URL, the transformation string is always added as a query parameter.false
. If set to true
, the SDK generates a signed image URL adding the image signature to the image URL.signed
parameter. It specifies the time in seconds from now when the signed URL will expire. If specified, the URL contains the expiry timestamp in the URL, and the image signature is modified accordingly.height
for h
and width
for w
parameter. It makes your code more readable. See the Full list of supported transformations.h
and w
parameters instead of height
and width
.ik-s
parameter or the signature is invalid, ImageKit will return a forbidden error instead of an actual image.url
function.$imageKit->uploadFile()
or $imageKit->uploadFile()
method to upload files to the ImageKit Media Library.searchQuery
.versionID
can be found in the following APIs as id
within the versionInfo
parameter:fileIds
of the files and an array of tags
that have to be added to those files.fileIds
of the files and an array of tags
that have to be removed from those files.fileIds
of the files and an array of AITags
that have to be removed from those files.If a file or specific transformation has been requested in the past, then the response is cached. Deleting a file does not purge the cache. You can purge the cache using Purge Cache API.
You can delete only the non-current version of a file.
If any file at the destination has the same name as the source file, then the source file and its versions (ifincludeFileVersions
is set to true) will be appended to the destination file version history.
If any file at the destination has the same name as the source file, then the source file and its versions will be appended to the destination file.
The old URLs will stop working. The file/file version URLs cached on CDN will continue to work unless a purge is requested.
purgeCache
is set to true
, response will return purgeRequestId
. This purgeRequestId
can be used to get the purge request status.If any file at the destination has the same name as the source file, then the source file and its versions will be appended to the destination file version history.
requestId
is returned, which can be used to fetch the status of the submitted purge request with Purge Cache Status API.requestId
returned when a purge cache request gets submitted with Purge Cache API​schema
for your metadata keys, and the value filled against that key will have to adhere to those rules. You can Create, Read and Update custom metadata rules and update your file with custom metadata value in File update API or File Upload API.