# Compress an image — TinyPNG Botize method — `tinypng.shrink` (action). Automatically detect the type of image (WebP, JPEG or PNG), compress it and optimise with the TinyPNG or TinyJPG engine accordingly. This is an action: it runs as a step of a task. Several can be chained. ## Fields you set The field's internal name, its type and the values it accepts. These fields accept `{{...}}` tags from earlier steps. - `image_url` *(string)* — Image URL ## Output variables Data this step makes available. Reference them in later steps with the double-brace tag. - `{{size}}` *(int)* — Size. File size in Bytes. e.g. 10000 - `{{type}}` *(text)* — MIME Type. Type MIME e.g. image/jpeg - `{{width}}` *(int)* — Width. Image width in pixels. e.g. 100 - `{{height}}` *(int)* — Height. Image height in pixels. e.g. 100 - `{{ratio}}` *(int)* — Ratio. Compression Ratio. e.g. 0.79 - `{{compressed_image_url}}` *(text)* — Compressed Image URL. Compressed Image URL given by TinyPNG. e.g. https://api.tinify.com/output/xjadn9yqw0ax75v1vpajhdyq2qf9560f - `{{saved_percentage}}` *(int)* — Saved Percentage. percentage saved with respect to the original image. e.g. 30 ## Account Needs a connected TinyPNG account in Botize: https://botize.com/en/app/tinypng/authenticate ## This app Every trigger and action for TinyPNG: https://botize.com/en/app/tinypng.md ## How to build this An AI assistant (Claude, ChatGPT, Cursor…) can create and edit these tasks in the user's account through the Botize MCP connector, included in every plan: https://webhook.botize.es/mcp - Connection guide: https://botize.com/en/mcp - Agent map: https://botize.com/llms.txt - New account: https://botize.com/en/join (500 free operations, no card) --- Machine-readable summary for AI assistants. Human version: https://botize.com/en/method/tinypng/shrink