How to change image from HEIC to JPG?

I got some user uploaded images in HEIC format. Got to know that these come from Apple devices but I cannot load them directly on my website? How do I convert them to JPG so that they load correctly on all browsers?

There are two ways to do it - either forcefully convert it to JPG or let ImageKit’s automatic format optimization handle it for you.

Force format conversion from HEIC to JPG

To force convert an image from HEIC to JPG you can simply add the f-jpg parameter to the image URL for force the image to JPG format.

This is a HEIC Image URL

https://ik.imagekit.io/ikmedia/docs_images/Community/resort.heic

You can force it to JPG like this

https://ik.imagekit.io/ikmedia/docs_images/Community/resort.heic?tr=f-jpg

Automatic format optimization for HEIC to JPG

If this parameter is not added, but you turn on automatic format optimization for images in ImageKit, we would automatically convert the HEIC image to a suitable format like JPG or WebP. This ensures that your images are always loaded correctly on each device and are viewable by the user.