---
title: "Resizes a source image"
method: GET
path: "/img/{imgUrl}/resize"
tags: ["images"]
---

# Resizes a source image

`GET /img/{imgUrl}/resize`

Resizes a source image to the specific size, but will always respect
aspect ratio. Will apply similar to /optimise optimisations.

Use /fit to resize to the exact given size with ignoring aspect ratio.

## Path parameters

- `imgUrl` string, required

## Query parameters

- `dppx` number, float
- `save-data` 'off' | 'hide'
- `trim-border` boolean
- `size` string, required

## Response `200`

A resized image

## Changes

- **2023-12-29** `cad07fafe731` — 2 info
  - the `query` request parameter `dppx` became optional
  - the `query` request parameter `save-data` became optional
- **2023-12-19** `18cbc1c76caa` — 1 info
  - added the new optional `query` request parameter `trim-border`
- **2023-07-20** `f053d6fb3a38` — 1 info
  - added the media type `image/jxl` for the response with the status `200`
- **2022-03-04** `a3e4afa484da` — 2 info
  - added the media type `image/avif` for the response with the status `200`
  - added the media type `image/webp` for the response with the status `200`
- **2022-02-28** `ac53f9796a01` — 5 breaking, 1 warning
  - the `query` request parameter `dppx` became required
  - the `query` request parameter `save-data` became required
  - removed the media type `image/avif` for the response with the status `200`
  - removed the media type `image/jxl` for the response with the status `200`
  - …2 more

[Change history](https://skmtc.dev/pixboost/apis/image-cdn-api-for-web/changes/img/:imgUrl/resize/get.md)

---

[API](https://skmtc.dev/pixboost/apis/image-cdn-api-for-web.md) · [All operations](https://skmtc.dev/pixboost/apis/image-cdn-api-for-web/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pixboost/image-cdn-api-for-web/revisions/b1380a4d73ae/schema)
