Image Optimization

Learn how to perform on-the-fly image transformations using Medianova’s Image Optimization parameters and URL-based API.

The Image Optimization and Resize Service allows you to dynamically transform images by adding parameters directly to your CDN image URLs. All transformations are performed at the CDN edge to reduce latency and offload processing from your origin.

By using edge-side transformations, you can improve load times, reduce origin workload, and deliver optimized images tailored for different screen sizes and layouts.

Common Conventions

Item
Description

Base URL

https://{account}.mncdn.com/{module}/{parameters}/{path}/{image}.{ext}

Supported Formats

jpg, png

File Limits

Files larger than 25MB or exceeding 3000×3000 px will return 415 – Unsupported Media Type.

Cache Behavior

Each transformation (unique URL) is stored as a separate cache object.

WebP Output

Images may automatically be delivered as WebP depending on browser support.

Origin vs CDN URL Example

https://www.yourdomain.com/path/image.jpghttps://youraccount.mncdn.com/mnresize/400/300/path/image.jpg

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

Modules Reference

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

MNRESIZE

Overview

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

Overview

Add uniform padding around an image using a HEX color.

Syntax

Example

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

MNCROP

Overview

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

Syntax

MNCROPRESIZE

Overview

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

Syntax

MNROTATE

Overview

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

Syntax

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

MNWATERMARK

Overview

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

Overview

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

Compatibility & Limits

  • Files larger than 25 MB or exceeding 3000×3000 px415 Unsupported Media Type.

  • Supported file formats: jpg, png.

  • Each URL variation is individually cached; purge accordingly.

  • Watermark and rotation cannot be combined.

  • Optimized images may be automatically converted to WebP when browser-supported.

Last updated

Was this helpful?