---
title: Resize and Convert Image API
slug: resize-and-convert-image
url: https://apyhub.com/frolic/service/resize-and-convert-image
provider: Hakimi Labs
categories: [Ingestion Kit, Media Kit]
tags: [image-resizing, image-conversion, thumbnail-generation, image-processing, metadata-stripping]
auth: api_key
version: 1.0
service_type: sync
endpoints: 1
atoms: 10
mcp: true
---

# Resize and Convert Image API

Resize uploaded images, convert between JPG, PNG, WebP, and AVIF, and strip metadata. Returns the resized image as binary output.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/frolic/resize-and-convert-image/image/resize` | What it does Resizes an uploaded image and returns the processed image as binary output. You can ch… | 10 |

## Endpoint reference

### Resize and Convert Image API

`POST https://api.eu.apyhub.com/frolic/resize-and-convert-image/image/resize` · 10 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `to` | body | string | no | Output format: jpg, png, webp or avif (default: same as the input) One of: jpg, png, webp, avif. |
| `fit` | body | string | no | contain, cover or fill; cover and fill need width and height One of: contain, cover, fill. Default: `contain`. |
| `file` | body | string (binary) | yes | Image (max 10 MB, 40 megapixels): JPEG, PNG, WebP, AVIF, TIFF or GIF |
| `strip` | body | boolean | no | Remove EXIF, XMP and IPTC metadata such as GPS location Default: `false`. |
| `width` | body | integer (int32) | no | Width in pixels (1-10000) Example: `800`. |
| `height` | body | integer (int32) | no | Height in pixels (1-10000) |
| `quality` | body | integer (int32) | no | 1-100, for jpg, webp and avif Default: `85`. |

#### Quickstart

Upload an image to resize it and return the converted file.

```bash
curl -X POST "https://api.eu.apyhub.com/frolic/resize-and-convert-image/image/resize" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg"
```

#### What you'll get back

Returns a binary file (`string` with `format: binary`) containing the resized image.

## About

## What it does
Image Resizer takes an uploaded image, resizes it, and returns the transformed file as binary output. Send a JPEG, PNG, WebP, AVIF, TIFF, or GIF up to 10 MB and 40 megapixels, and choose how the image should be fit, sized, and encoded.

Use `width` and `height` to control the output dimensions. Choose `fit` as `contain`, `cover`, or `fill` depending on whether you want to preserve aspect ratio, crop to exact bounds, or stretch to the target size. You can also set `to` to convert the image to `jpg`, `png`, `webp`, or `avif`, and tune `quality` for jpg, webp, and avif outputs.

If you need to remove embedded metadata before publishing or sharing an image, set `strip` to true. That removes EXIF, XMP, and IPTC data, including details like GPS location. This is useful for CMS uploads, product listings, avatar processing, and any workflow where you need consistent image dimensions before storage or delivery.

The response is a binary image file, ready to save, serve, or pass to another step in your pipeline.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/frolic/service/resize-and-convert-image
