Skip to main content
Server path: /tinify | Type: Application | PCID required: Yes

Tools

ToolDescription
tinify_compress_imageCompress an image
tinify_transform_imageTransform a compressed image

tinify_compress_image

Compress an image Parameters:
ParameterTypeRequiredDefaultDescription
sourceobjectYesThe source value

tinify_transform_image

Transform a compressed image Parameters:
ParameterTypeRequiredDefaultDescription
output_tokenstringYesThe output token from a previous compression. This is the path segment from the Location header or output.url returned by the compress endpoint (e.g., the part after /output/ in the URL).
convertobjectNoConvert the image to a different format.
preservestring[]NoMetadata to preserve from the original image.
resizeobjectNoResize the image. Requires at least a method and one dimension.
storeobjectNoStore the result directly to a cloud storage service instead of returning it.
transformobjectNoApply transformations. Currently only supports setting a background color for transparent-to-JPEG conversions.