Compress an image from a URL
tinypng_compress_imageWRITE (uses quota): ask TinyPNG (Tinify) to fetch a public image by URL and compress it (JPEG, PNG, WebP, AVIF or JPEG XL). Returns the output_url (Tinify's Location address of the compressed image), the compressed size and type, the savings when the input size is known, and the Compression-Count header (compressions used this month). The image is stored by Tinify for about 48 hours; output_url needs your API key, so use tinypng_download_image to get the bytes and tinypng_transform_image to resize, convert or keep metadata. Each compression counts against the monthly quota of your Tinify API key (the free plan includes 500 per month); resizing and converting count one extra compression each. POST /shrink.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public http(s) URL of the image to compress. Tinify's servers fetch it, so it must be reachable from the internet. |