urlEndpoint
is the required parameter. You can get the value of URL-endpoint from your ImageKit dashboard - https://imagekit.io/dashboard#url-endpoints. publicKey
and privateKey
parameters are also 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#developers.https://www.custom-domain.com/default-image.jpg
then you can use src
prop to load the image.height
for h
and width
for w
parameter. It makes your code more readable. See the full list of supported transformations in PHP SDK on Github. h
and w
parameter instead of height
and width
. See the complete list of transformations supported in ImageKit here.transformation
parameter to chain these transformations sequentially.ik-s
parameter or the signature is invalid, ImageKit will return a forbidden error instead of an actual image.$imageKit->upload()
method to upload files to the ImageKit Media Library. It accepts all the parameters supported by the ImageKit Upload API.uploadFiles()
method requires at least the file
and the fileName
parameter to upload a file and returns a JSON response. You can pass other parameters supported by the ImageKit upload API using the same parameter name as specified in the upload API documentation. For example, to specify tags for a file at the time of upload use the tags
parameter as specified in the documentation here.error
will be null
and the result
will be the same as what is received from ImageKit's servers. If the upload fails, error
will be the same as what is received from ImageKit's servers and the result
will be null.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.jobId
that is returned by copy and move folder operations.token
, expiry
timestamp and a valid signature
for that upload. The SDK provides a simple method that you can use in your code to generate these authentication parameters for you.token
and expire
parameters are optional. If not specified, the SDK generates a random token and also generates a valid expiry timestamp internally. The value of the token
and expire
used to generate the signature are always returned in the response, no matter if they are provided as an input to this method or not.pHashDistance
function to calculate the distance between two pHash values. It accepts two pHash hexadecimal strings and returns a numeric value indicative of the level of difference between the two images.