For the complete documentation index, see llms.txt. This page is also available as Markdown.

Image Optimization

Learn how to configure Image Optimization and transform JPG and PNG images using URL-based processing modules.

Image Optimization transforms images delivered through Medianova CDN by applying processing modules directly through the CDN URL. Supported operations include resizing, padding, cropping, rotation, watermarking, and custom cropping.

Transformations are performed at the CDN edge without modifying the source image at the origin.

Each transformed image URL creates a separate cache object. Purge each transformed URL individually to invalidate cached variants.

Enable Image Optimization

Image Optimization is disabled by default.

1

Open Optimization

Open your CDN Resource and select Optimization.

2

Open Image Optimization

Select Image Optimization.

3

Enable Image Optimization

Turn on Image Optimization.

4

Confirm the change

Click Confirm.

Image Optimization becomes active after confirmation.

Image Optimization limits

The following limits apply to source images and transformed image requests.

Item
Value

Supported formats

JPG, PNG

Maximum file size

100 MB

Maximum resolution

3000 × 3000 px

Cache behavior

Each transformed URL creates a separate cache object.

The 3000 × 3000 px resolution limit applies to mnresize, mncrop, mncropresize, mnpadding, and mncustomcrop.

Requests that exceed the applicable file size or resolution limit return 415 Unsupported Media Type.

URL structure

Image Optimization modules use the following URL structure:

Replace:

  • <ACCOUNT> with your Medianova CDN account name.

  • <MODULE> with the Image Optimization module.

  • <PARAMETERS> with the parameters required by the selected module.

  • <PATH> with the image path, if applicable.

  • <IMAGE> with the source image name.

  • <EXT> with the supported source image extension.

For example, an origin image can be requested through the mnresize module as follows:

To verify a transformation, open the transformed CDN URL in a browser.

Some image requests may fail due to format or size constraints. See Image Optimization Troubleshooting for details.

Image Optimization Modules Reference

Each Image Optimization module operates independently and uses its own parameter structure. Select the module that matches the transformation you need.

MNRESIZE

Resize an image while preserving its original aspect ratio. Either width or height may be set to - to auto-calculate the other dimension.

Syntax

Parameters

Parameter
Description

width

Target width; use - for auto-calculated width

height

Target height; use - for auto-calculated height

path

(Optional) Folder path

ext

jpg, png

Examples

  • .../mnresize/400/225/image.jpg

  • .../mnresize/-/300/image.jpg

  • .../mnresize/400/-/image.jpg

MNPADDING

Add uniform padding around an image using a HEX color.

Syntax

Example

.../mnpadding/400/125/C0C0C0/image.jpg

MNCROP

Crop the image to the target dimensions by centering the original image.

Syntax

MNCROPRESIZE

Resize and crop the image in one step to produce exact output dimensions without distortion.

Syntax

MNROTATE

Rotate an image by 90, 180, or 270 degrees.

Syntax

MNROTATE cannot be combined with other modules. Supported angles: 90, 180, 270.

MNWATERMARK

Apply a custom watermark to all images served through the CDN.

Notes

  • Watermarking must be enabled by Medianova Support.

  • Newly served images receive the watermark automatically.

  • Purge existing cache entries to apply the watermark to previously cached images.

  • Transparent PNG watermarks are supported.

Watermarked images cannot be rotated or cropped using other modules.

MNCUSTOMCROP

Crop a specific region using pixel coordinates. Coordinates (x, y) represent the top-left point of the crop area.

Syntax

Example

.../mncustomcrop/800/1200/430/200/image.jpg

For automatic WebP conversion, see WebP Optimization.

Last updated

Was this helpful?