Convert your images to any other format either by simply changing the extension of the file, or by setting the
format parameter. You can either covert the image's format while uploading or upload the image as is and dynamically convert its format on delivery.
Static or dynamic image are uploaded to Cloudinary in various formats. You might want to dynamically convert them for displaying in your web site in your desired format.
Here's the original image, when not specifying the extension part, the image will be delivered as the original format (in this example - JPG):
In order to deliver it as any other format, simply set the format as the extension of the file name:
When you need to display high quality illustrations with a transparent background, the PNG (24 bit) format is probably the best choice. Note that PNG is usually expensive in file size, which affects your bandwidth: Here's an example of the same image, converted to PNG, scaled down and cropped to a shape of a circle. Note that PNG supports transparent background:
You might want to use a low quality JPG format to deliver your images much quicker as they are smaller in size (which saves lots of bandwidth). This is done with the
quality parameter (
q in URLs):
Setting the 'quality' parameter to a too low value might be noticeable:
Note that 'nice_beach' is the Public ID of the resource and '.jpg' is the extension that represents the format required for the delivery.
When using the API, you can also convert the image's format by setting the
cl_image_tag("nice_beach", :format => :png)
Cloudinary currently supports the following formats: JPG, PNG, GIF, BMP, TIFF, ICO, PDF, EPS, PSD, SVG, WebP, JXR, and WDP.