> For the complete documentation index, see [llms.txt](https://clients.medianova.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clients.medianova.com/products/performance-cdn/image-optimization-and-webp/image-optimization/image-optimization-troubleshooting.md).

# Image Optimization Troubleshooting

Use the following checks when an Image Optimization request returns an error or does not produce the expected transformation.

## Resolve 415 Unsupported Media Type errors

A `415 Unsupported Media Type` response indicates that Image Optimization cannot process the requested image.

A `415 Unsupported Media Type` response can occur when:

* The image exceeds the applicable file size or resolution limit.
* The source image format is not supported.
* The file extension and the `Content-Type` returned by the origin do not match.

### Check file size and resolution

Image Optimization supports source images up to **100 MB**.

A maximum resolution of **3000 × 3000 px** applies to the following modules:

* `mnresize`
* `mncrop`
* `mncropresize`
* `mnpadding`
* `mncustomcrop`

Requests that exceed an applicable limit return `415 Unsupported Media Type`.

To resolve the issue:

* Reduce the source image file size if it exceeds 100 MB.
* Reduce the image resolution when using a module subject to the 3000 × 3000 px limit.
* Replace the source image at the origin with a version that meets the applicable limits.

### Check the source image format

Image Optimization supports the following source formats:

* JPG
* PNG

Requests using unsupported source formats return `415 Unsupported Media Type`.

To resolve the issue:

* Convert the source image to JPG or PNG.
* Update the image URL to reference the supported source image.

### Check Content-Type consistency

A `415 Unsupported Media Type` response can occur when the image extension does not match the `Content-Type` returned by the origin.

For example:

| Property            | Value            |
| ------------------- | ---------------- |
| File extension      | `.png`           |
| Origin Content-Type | `image/x-ms-bmp` |

Although the URL uses a supported `.png` extension, the media type returned by the origin is not consistent with the expected image format.

**Recommended resolution**

Configure the origin or storage service to return the correct `Content-Type` for the source image.

For a PNG image:

```http
Content-Type: image/png
```

Depending on the origin or storage service, correcting the `Content-Type` may require updating the object's metadata or uploading the image again.

**Temporary workaround**

If the origin configuration cannot be changed immediately, use a Page Rule to override the response header for the affected path.

For a PNG image:

* Match the affected `.png` path.
* Configure the response header as follows:

```
Content-Type: image/png

```

{% hint style="info" %}
Overriding the `Content-Type` header does not change the actual file format. Use a header override only when the file content matches the configured media type.
{% endhint %}

## Resolve transformation request errors

A transformation request can fail even when the source image meets the supported format and size requirements.

### Check transformation parameters

Verify that the requested URL follows the syntax defined for the selected Image Optimization module.

Check that:

* The correct module name is used.
* Required parameters are present.
* Numeric parameters contain valid values.
* The parameters follow the required order.
* The requested modules do not use an unsupported combination.

See [Image Optimization](/products/performance-cdn/image-optimization-and-webp/image-optimization.md) for module syntax, parameters, and limitations.

## Resolve cache-related inconsistencies

Each transformed image URL creates a separate cache object. Previously cached content or headers can therefore remain associated with an individual transformed URL.

### Clear a cached variant

After correcting the source image, origin headers, or transformation request:

1. Purge the affected transformed image URL.
2. Request the transformed URL again.
3. Verify the response and transformed image.

{% hint style="info" %}
Purging the original image URL does not invalidate separately cached transformed variants. Purge each affected transformed URL individually.
{% endhint %}

## When to contact Medianova Support

Contact Medianova Support if the source image meets the applicable format, file size, resolution, and `Content-Type` requirements but the issue continues after purging the affected transformed URL.

Include the following information:

* CDN Resource name
* Source image URL
* Transformed image URL
* Image Optimization module
* Observed HTTP status code
* Approximate time of the request


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://clients.medianova.com/products/performance-cdn/image-optimization-and-webp/image-optimization/image-optimization-troubleshooting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
