# Convert HEIC to JPEG/WEBP/AVIF [View original](https://ittybit.com/guides/convert-heic-to-jpeg-webp-avif) ## Convert HEIC to JPEG ```js const task = await ittybit.tasks.create({ kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'jpeg', }); ``` ```python task = ittybit.tasks.create( kind='image', url='https://example.com/iphone-photo.heic', format='jpeg', ); ``` ```ruby task = ittybit.tasks.create( kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'jpeg', ); ``` ```php $task = $ittybit->tasks->create([ 'kind' => 'image', 'url' => 'https://example.com/iphone-photo.heic', 'format' => 'jpeg', ]); ``` ```go task, err := ittybit.Tasks.Create( context.TODO(), &ittybit.TaskCreateParams{ Kind: "image", URL: "https://example.com/iphone-photo.heic", Format: "jpeg", }, ) ``` ```js const task = await fetch('https://api.ittybit.com/tasks', { method: 'POST', headers: { 'Authorization': `Bearer ${ITTYBIT_API_KEY}` }, body: JSON.stringify({ kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'jpeg', }) }) ``` *** ## Convert HEIC to WEBP ```js const task = await ittybit.tasks.create({ kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'webp', }); ``` ```python task = ittybit.tasks.create( kind='image', url='https://example.com/iphone-photo.heic', format='webp', ); ``` ```ruby task = ittybit.tasks.create( kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'webp', ); ``` ```php $task = $ittybit->tasks->create([ 'kind' => 'image', 'url' => 'https://example.com/iphone-photo.heic', 'format' => 'webp', ]); ``` ```go task, err := ittybit.Tasks.Create( context.TODO(), &ittybit.TaskCreateParams{ Kind: "image", URL: "https://example.com/iphone-photo.heic", Format: "webp", }, ) ``` ```js const task = await fetch('https://api.ittybit.com/tasks', { method: 'POST', headers: { 'Authorization': `Bearer ${ITTYBIT_API_KEY}` }, body: JSON.stringify({ kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'webp', }) }) ``` *** ## Convert HEIC to AVIF ```js const task = await ittybit.tasks.create({ kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'avif', }); ``` ```python task = ittybit.tasks.create( kind='image', url='https://example.com/iphone-photo.heic', format='avif', ); ``` ```ruby task = ittybit.tasks.create( kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'avif', ); ``` ```php $task = $ittybit->tasks->create([ 'kind' => 'image', 'url' => 'https://example.com/iphone-photo.heic', 'format' => 'avif', ]); ``` ```go task, err := ittybit.Tasks.Create( context.TODO(), &ittybit.TaskCreateParams{ Kind: "image", URL: "https://example.com/iphone-photo.heic", Format: "avif", }, ) ``` ```js const task = await fetch('https://api.ittybit.com/tasks', { method: 'POST', headers: { 'Authorization': `Bearer ${ITTYBIT_API_KEY}` }, body: JSON.stringify({ kind: 'image', url: 'https://example.com/iphone-photo.heic', format: 'avif', }) }) ``` *(See [SDKs](/sdks) for install and initialization steps.)*