---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Workday REST API, REST API, REST Services]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Concept: Image Resize REST API Header
layout: subsection
---

<a id="section_hfc_hdy_wsb"></a>
The Image Resize REST API header (for apps) enables you to set a maximum image dimension for automatic image resizing, reducing impact on app performance and storage requirements. You can use the Image Resize API header with Workday REST API attachment endpoints invoked by your app.

<b>Notes:</b>

-   You don't need to use the Image Resize API header if your app sets the `maxImageDimension` attribute on a `fileUploader` widget. The Image Resize API Header automatically applies if a PMD in your app uses the `maxImageDimension` attribute.
-   Use the Image Resize API header if your app calls a Workday REST attachment endpoint without the `fileUploader` and `maxImageDimension` attribute (Example: an Extend app that uses a Studio integration). Workday recommends that you use the Image Resize API header if your app anticipates a high volume of attachments (Example: more than 1000 uploads an hour).


To set a maximum image dimension, specify the `x-wd-image-max-dimension` API header with a value between 1 and 5000. Example:

```
x-wd-image-max-dimension: 1024
```

The API gateway automatically resizes the longest edge of the image to the specified value when:

-   The REST API attachment request routes through the API gateway (`api.workday.com`).
-   The image attachment uses any of these file types:

    -   .bmp
    -   .gif
    -   .jpg
    -   .jpeg
    -   .png

-   The length or width of the image is greater than the specified `x-wd-image-max-dimension` value.


<b>Note:</b> The API gateway ignores this header for requests that don't contain images. This header only triggers image resizing when the request routes through the api.workday.com endpoint.

## <a id="section_xfg_krd_l4b"></a>Guidelines and Limitations

-   Consider a relatively small value that doesn't distort the readability of the image. We recommend that you set `maxImageDimension` to a number between 800 and 2000. If you're unsure which `x-wd-image-max-dimension` value to specify, we suggest 1024. If the average image size is 4 MB, the 1024 value can reduce the size to approximately 25% of the original size, depending on the original resolution.
-   To view the resized file size for which Workday bills you in a request, see the `wd_billed_request_bytes` log field on the <b>Analytics</b> dashboard.


## <a id="section_j1w_n53_pkb"></a>Example

This sample `curl` command submits a check-in attachment to the `POST /workers/{id}/checkIns` endpoint of the Staffing REST service.

```
curl POST 'https://api.workday.com/staffing/v1/workers/ad3b6e21b21b100301e6c888e90816da/checkInTopics' \
--header 'Accept: application/json' \
--header 'Content-Type: multipart/form-data' \
--header 'x-wd-image-max-dimension: 1024' \
--header 'Authorization: <accessToken>' \
--form 'file1=@"/C:/data/myWorkspace.jpg"' \
--form 'jsonData="{ 
    \"name\": \"checkInBackToOffice\",
    \"checkInTopicAttachments\": [
       {\"file\": \"cid:file1\"}
    ]
}"'
```

For illustration purposes, note that the file length of the sample attachment <i>myWorkspace.jpg</i> is 318,208 with dimensions 1920x1080. Using the <i>x-wd-image-max-dimension: 1024</i> header, the file length decreased to 102,188 as shown in the `fileLength` in this sample response:

```
{
    "Check-In_Topic_ID": "CHECK-IN_TOPIC-17-37",
    "checkInTopicAttachments": [
        {
            "descriptor": "myWorkspace.jpg",
            "fileLength": 102188,
            "fileName": "myWorkspace.jpg",
            "id": "b7eaba1c177401000e4120137ef10001",
            "contentType": {
                "descriptor": "image/jpeg - mime_image",
                "id": "d9ae5d84446c11de98360015c5e6daf6"
            }
        }
    ],
    "id": "b7eaba1c177481000e4120137ef10000",
    "name": "checkInBackToOffice"
}
```

