Compressing both JPEG and PNG
With the launch of TinyJPG the API now accepts JPEG images as well as PNG images! It detects the file type that you upload and will automatically switch between the JPEG and PNG compression engine.
Once you retrieve your key, you can immediately start shrinking images. You can submit a PNG or JPEG file with any HTTP client. The server will compress your image and respond with a URL where you can grab the result.
curl -i --user api:YOUR_API_KEY --data-binary @large.png https://api.tinify.com/shrink
The key can also be used to compress JPEG and PNG images with the WordPress plugin that has just been released.
For documentation and more examples explore the API Reference.