Format conversion

This post provides a quick guide to change the image format for an image that is served from ImageKit. You can read a more detailed documentation here.

URL Transformation
Parameter – f (from jpg,jpeg,png,webp)

Dashboard Setting
Settings > Image optimization setting > Dynamic image format selection

If dynamic format selection is on (recommended), then ImageKit automatically picks the best image format for all images taking into account all the possible factors.

1. Automatic format selection without specifying format in the URL

Recommended. ImageKit automatically selects the best format for the image depending on the image content, browser support and image size. You can read more about it in the browser-based format selection post and content-based image optimization.

Image without format parameter in URL. Can be WebP or JPG or PNG depending on different factors. Best format selection

https://ik.imagekit.io/demo/tr:w-200/medium_cafe_B1iTdD0C.jpg

2. Format WebP

WebP Image – 10.8KB. May not be visible in some browsers like Firefox, Safari.

https://ik.imagekit.io/demo/tr:w-200,f-webp/medium_cafe_B1iTdD0C.jpg

 

3. Format JPG / JPEG

JPEG image, 17.2KB

https://ik.imagekit.io/demo/tr:w-200,f-jpg/medium_cafe_B1iTdD0C.jpg

4. Format PNG

PNG Image, 79.9KB

https://ik.imagekit.io/demo/tr:w-200,f-png/medium_cafe_B1iTdD0C.jpg