Tinify
App · Images & Design · 2 actions
Compress and convert PNG, JPEG, WebP, and AVIF images with Tinify (TinyPNG / TinyJPG) to shrink file sizes without losing quality.
Compress Image
Shrink a PNG, JPEG, or WebP image's file size with Tinify (TinyPNG) while keeping it looking the same. The compressed image is saved so later steps can email, upload, or store it.
Inputs
- Image
imagetextRequired - The image to compress: upload one, pick a file from an earlier step, or paste a public image URL.
- Save as
filenametext - Optional. The name to save the compressed image under. Defaults to the original name.
Outputs
compressed_size_bytesnumber- Size of the compressed image in bytes
content_typetext- MIME type of the saved image
document_reftext- Reference to the compressed image, for use by a later step
documentslist- The compressed image, in the shape steps that send or upload files expect
filenametext- Name the image was saved under
heightnumber- Height of the compressed image in pixels
original_size_bytesnumber- Size of the original image in bytes
size_bytesnumber- Size of the saved image in bytes
urltext- Download URL for the compressed image
widthnumber- Width of the compressed image in pixels
Example output
{
"compressed_size_bytes": 40213,
"content_type": "image/png",
"document_ref": "doc_5c6d7e8f90a1b2c35c6d7e8f90a1b2c3",
"documents": [
{
"content_type": "image/png",
"document_ref": "doc_5c6d7e8f90a1b2c35c6d7e8f90a1b2c3",
"filename": "compressed.png",
"size_bytes": 40213,
"url": "/actions/core/serve-document/doc_5c6d7e8f90a1b2c35c6d7e8f90a1b2c3?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "compressed.png",
"height": 512,
"original_size_bytes": 102400,
"size_bytes": 40213,
"url": "/actions/core/serve-document/doc_5c6d7e8f90a1b2c35c6d7e8f90a1b2c3?teamId=6512a1b2c3d4e5f600000001",
"width": 512
}Convert Image
Convert an image to another format (WebP, JPEG, PNG, or AVIF) with Tinify, compressing it at the same time. The converted image is saved so later steps can email, upload, or store it.
Inputs
- Image
imagetextRequired - The image to compress: upload one, pick a file from an earlier step, or paste a public image URL.
- Convert to
formattextRequired - The image format to convert to.One of:
image/webp(WebP),image/jpeg(JPEG),image/png(PNG),image/avif(AVIF). Default:image/webp. - Background color
backgroundtext - Optional. A background color (like `#FFFFFF`, `white`, or `black`) to fill transparency when converting to JPEG, which has no transparency.
- Save as
filenametext - Optional. The name to save the converted image under. Defaults to the original name.
Outputs
content_typetext- MIME type of the saved image
document_reftext- Reference to the converted image, for use by a later step
documentslist- The converted image, in the shape steps that send or upload files expect
filenametext- Name the image was saved under
formattext- The MIME type the image was converted to
heightnumber- Height of the converted image in pixels
size_bytesnumber- Size of the saved image in bytes
urltext- Download URL for the converted image
widthnumber- Width of the converted image in pixels
Example output
{
"content_type": "image/webp",
"document_ref": "doc_6d7e8f90a1b2c3d46d7e8f90a1b2c3d4",
"documents": [
{
"content_type": "image/webp",
"document_ref": "doc_6d7e8f90a1b2c3d46d7e8f90a1b2c3d4",
"filename": "converted.webp",
"size_bytes": 28104,
"url": "/actions/core/serve-document/doc_6d7e8f90a1b2c3d46d7e8f90a1b2c3d4?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "converted.webp",
"format": "image/webp",
"height": 512,
"size_bytes": 28104,
"url": "/actions/core/serve-document/doc_6d7e8f90a1b2c3d46d7e8f90a1b2c3d4?teamId=6512a1b2c3d4e5f600000001",
"width": 512
}