Format auto
Format auto returns the input image in the specified type, rather than being left as the original image’s type. It currently supports conversion to JPG, PNG, and WEBP. Use the format
keyword with the file extension as an argument. You can also modify the quality of the image. This comes in handy if you need to submit an image with a specific file size.
The following is a sample string: https://image.pbs.org/path/to/file.jpg?format=ext&quality=
Parameters
- format -- tells ITS a format transform is being requested
- ext -- specifies the requested output type. Can be jpg, png, or webp. Use "auto" if you want ITS to examine the image and determine what file type to return, based on the image's complexity.
- quality (optional) – specifies the quality of the image that is returned. Currently, this parameter only works with the
jpg
format and accepts values from 10-100.
Example
Original Image
https://image.pbs.org/test/my-image.jpg