TinyPNG
Compress, resize and convert PNG, JPEG, WebP and AVIF images with the TinyPNG (Tinify) API.
Categories: Developer Tools, Document Management
What you can ask
- Compress
https://cdn.acme.com/blog/header.pngand report the size reduction. - Resize the product photo at
https://cdn.acme.com/p/1042.jpgto 800 by 800 pixels. - Convert the homepage hero image to WebP.
Set up
TinyPNG connects with credentials from your TinyPNG account. Have these values ready:
- API key
- Go to Organization > Connectors and find TinyPNG.
- Click Enable and choose which tools to allow.
- Each member enters their own values the first time they use it.
To use one account for the whole organization, turn on Share one connection with everyone. Every member's agents then act as that account, with exactly the access it has.
Tools
TinyPNG offers 5 tools. Admins choose which ones agents can use. See Tool permission groups.
Read (2)
View and search information without changing it.
| Tool | What it does |
|---|---|
get_compressed_image | Download a compressed image by output_id and return it base64-encoded. |
validate_credential | Check that the stored TinyPNG API key is accepted. |
Write (3)
Create or send data.
| Tool | What it does |
|---|---|
compress_image | Compress a PNG, JPEG, WebP or AVIF with TinyPNG, either from base64 bytes (image_base64) or from a public URL (image_url) — pass exactly one. |
convert_image | Convert a compressed image to another format (WebP, JPEG, PNG, AVIF, or '*/*' for whichever is smallest) and return it base64-encoded. |
resize_image | Resize a compressed image and return the result base64-encoded. |