---
title: "Crop"
canonical: "https://docs.pbs.org/space/ITS/4423710/Crop"
format: markdown
---
> Macro (toc)

##  Overview

Crop transform delivers an image that is cropped and scaled to fit the [bounding box](https://docs.pbs.org/space/ITS/4423734/Glossary#boundingbox) specified by the user.  Crop differs from resizing because, while resizing retains the entire image, cropping deletes parts of the image to accommodate the requested size.

> ⚠️ **We recommend cropping to smaller dimensions. Requesting a larger size than the original results in compromised image quality.***** ***

[Click here to learn how to resize without cropping](https://pbs-docs.atlassian.net/wiki/spaces/ITS/pages/4423731)

## Parameters

| **Parameter** | **Description** |
| --- | --- |
| crop | ITS will dynamically adjust an image to be cropped and scaled as specified by the user. |
| no-scale-up | Prevents the image from upscaling beyond its original aspect ratio. Upscaling can increase encoding and load time, and also distort the image.<br>Note: If the `avif` format transformation is also applied, upscaling is automatically prevented, as this can lead to encoding time-outs. |

## How to use crop transform

ITS changes images by appending a [decorator](https://docs.pbs.org/space/ITS/4423734/Glossary#decorator) to the end of your original url string:

##### **Resize decorator format**

```
https://image.pbs.org/path/to/file.jpg?crop=WWxHH
```

Where:

- crop -- indicates that ITS should perform a crop and use the middle of the image as the focal point for the crop.
- WW -- a numerical pixel value representing the desired width of the output image
- HH -- a numerical pixel value representing the desired height of the output image

## How does ITS determine where to crop my image?

<span style="color: #24292e">The default crops the input image from the center of the image. The image will be resized down first, depending on the lesser dimension of the image.</span> 

> ⚠️ **Both width and height of the bounding box is required.**

## Live examples

#### Original image: [https://image.pbs.org/video-assets/5jJewwH-asset-mezzanine-16x9-esGHBDK.png](https://image.pbs.org/video-assets/5jJewwH-asset-mezzanine-16x9-esGHBDK.png)

![image]()


| **Resize by:** | **Example URL** | **Dimensions returned** | **Image result** |
| --- | --- | --- | --- |
| 700 x 200 | https://image.pbs.org/video-assets/5jJewwH-asset-mezzanine-16x9-esGHBDK.png?crop=700x200 | 700 x 200 | ![image]() |
| 200 x 500 | https://image.pbs.org/video-assets/5jJewwH-asset-mezzanine-16x9-esGHBDK.png?crop=200x500 | 200 x 500 | ![image]() |

## How to Prevent Upscaling

The `no-scale-up` option can be included with a crop transformation that will prevent the image from upscaling beyond its original aspect ratio. Upscaling can increase encoding and load time, and also distort the image. 

Note: If the `avif` format transformation is also applied, upscaling is automatically prevented, as this can lead to encoding time-outs.

Examples of how an image URL can be constructed with the `no-scale-up` option:

- https://image.pbs.org/contentchannels/image-url.png?crop=1500x2630,no-scale-up
- https://image.pbs.org/contentchannels/image-url.png?crop=1500x2630,no-scale-up&format=jpg