privateKeyparameters 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.jpgthen you can use
srcprop to load the image.
wparameter. It makes your code more readable. See the full list of supported transformations in PHP SDK on Github.
wparameter instead of
width. See the complete list of transformations supported in ImageKit here.
transformationparameter to chain these transformations sequentially.
ik-sparameter or the signature is invalid, ImageKit will return a forbidden error instead of an actual image.
uploadFiles()method requires at least the
fileNameparameter 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
tagsparameter as specified in the documentation here.
resultwill be the same as what is received from ImageKit's servers. If the upload fails,
errorwill be the same as what is received from ImageKit's servers and the
resultwill be null.
expirytimestamp and a valid
signaturefor that upload. The SDK provides a simple method that you can use in your code to generate these authentication parameters for you.
expireparameters are optional. If not specified, the SDK generates a random token and also generates a valid expiry timestamp internally. The value of the
expireused to generate the signature are always returned in the response, no matter if they are provided as an input to this method or not.
pHashDistancefunction 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.