← All microservices
Image converter
Images
Convert an image to JPG, PNG, WebP, AVIF, GIF, TIFF or BMP. Reads HEIC (iPhone photos) and ICO too.
What it does
- Reads HEIC, AVIF, WebP, PNG, JPG, GIF, TIFF, BMP and ICO
- Writes JPG, PNG, WebP, AVIF, GIF, TIFF and BMP
- Keeps animation between GIF and WebP
- Rotate, flip or turn black and white on the way
- Strips camera and GPS data by default
Good for
- iPhone photo uploads
- Faster websites with WebP and AVIF
- Cleaning up user uploads
Most people need it for iPhone photos: HEIC files that websites and older software cannot open. Send one in and get a JPG back.
Example
POST https://bloodweb.net/api/v1/image-convert
curl -H "Authorization: Bearer YOUR_KEY" -F file=@photo.heic -F to=jpg https://bloodweb.net/api/v1/image-convert -o photo.jpg
Options
| Name | Description |
|---|---|
filefile |
The image, up to 25MB: jpg, png, gif, webp, bmp, tiff, heic, avif, ico. |
to
required |
The output format. One of: jpg, png, webp, avif, gif, tiff, bmp |
quality
|
For JPG, WebP and AVIF. Default: 85 |
strip
|
Remove metadata such as camera details and GPS location. Default: true |
background
|
Fills transparent areas when the output format has no transparency (JPG, BMP). Default: #ffffff |
rotate
|
Turn the image clockwise, in degrees, after it is put the right way up. One of: 0, 90, 180, 270 Default: 0 |
flip
|
Mirror the image. One of: none, horizontal, vertical Default: none |
grayscale
|
Convert to black and white. Default: false |
Returns
The converted image. Animated GIF and WebP stay animated when converted to GIF or WebP.