Transform Images with Resizer v2
Photo Center stores images at their highest resolution, making it essential to use Image Resizer v2 for web display optimization.
For example, images that appear next to a story on a search engine results page must be thumbnail-sized so that the page loads quickly; they might also need to have a consistent shape, regardless of their original aspect ratios.
Instead of storing multiple versions of the same image, Arc XP uses a just-in-time image resizing service to create transformed images as needed, known as transformations. Then, Arc XP Content Delivery Network (CDN) stores and distributes these transformed images optimizing page loading times.
This document guides you through Resizer’s v2 key features, supported image formats, and the most common transformation use cases.
Resizer v2 key features
Resizer v2 has the following key features:
- Provides a dynamic image resizing and transformation service.
- Enables SEO-friendly image naming capabilities to enhance site performance.
- Brings built-in authentication token system included in the image ANS.
- Enables automatic CDN distribution for optimized delivery.
Supported image formats
Resizer v2 supports the following image formats:
- Internal Photo Center images
- External images:
- High-quality JPEGs
- PNGs (recommended for images requiring transparency)
- GIFs
- WebP
- Any standard web format
Dynamic format selection
Photo Center accepts image uploads and automatically optimizes delivery through Arc XP’s integration with our CDN provider. This system ensures optimal image format delivery based on client capabilities.
Upload process
Users upload JPEG, GIF, PNG, BMP, TIFF, WebP, or ICO files to Photo Center. The original asset is preserved as the source image, ensuring maximum compatibility and quality retention.
Image delivery
When a client requests an image, the CDN automatically evaluates the client’s capabilities and delivers the most efficient supported format. For JPEGs, the format selection is as follows:
-
AVIF: Delivered to modern browsers with AVIF support, providing superior compression and quality
-
WebP: Served to browsers supporting WebP but not AVIF, offering improved efficiency over JPEG
-
JPEG: Provided as a fallback for clients without WebP or AVIF support
This process occurs transparently without requiring any action from content creators or developers. The CDN handles format selection and conversion automatically, optimizing both performance and visual quality.
Image transformation parameters
Learn how to build transformation URLs to resize, crop, and modify your images. This guide covers the following:
Resizer v2 base path
All image transformations start with the following base path:
/resizer/v2/
Path parameters
The following tables describe and exemplify the path parameters available for Resizer v2.
Parameter | Description |
---|---|
| Original image to perform resize operations on. The source can reference an internal image from the Photo Center or a full external URL. |
ExamplesArc ID of an image from Photo Center. Ensure to include the extension as it appears in the CloudFront URL.
External non-Photo Center image: Encoded URL of a public external image, including the protocol.
|
Parameter | Description |
---|---|
| SEO-friendly filename to add descriptive text to your image URLs for better search engine visibility. This parameter appears before the Arc ID for internal images. You must use alphanumeric characters and dashes in the filename. |
ExamplesURL Building Patterns: Dynamically construct resizer URLs using SEO-friendly photo metadata:
Example URL with SEO Filename:
|
Query parameters
The following tables describe and exemplify the query parameters available for Resizer v2.
Parameter | Description |
---|---|
| Security parameter. Validate your image source using a Base64-encoded SHA256 security code. The auth code checks only the source image and ignores SEO filenames and query parameters. |
Example
|
Parameter | Description |
---|---|
| Image width in pixels. If only width is specified, the height matches the original aspect ratio. |
Example
|
Parameter | Description |
---|---|
| Image height in pixels. If only height is specified, the width matches the original aspect ratio. |
Example
|
Parameter | Description |
---|---|
| Resizes an image to fit specified dimensions while maintaining the aspect ratio. |
Example
|
Parameter | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Manual Crop. This parameter enables precise cropping of the source image by specifying the exact position and dimensions. The crop coordinates (X, Y) are measured from the image’s top-left corner. Sub parameters:
Pattern:
| |||||||||||||||
ExamplesCreate a 500x500 crop of the top-left corner:
Create a 400x100 vertical crop starting at the point [1023,705] from the top-left corner:
Create a 640x480 crop starting at the point [250,365] from the top-left corner, and resize the result to 350px wide:
|
Parameter | Description | ||||||
---|---|---|---|---|---|---|---|
| Focal Crop. This parameter enables precise control over the center point of your crop while maintaining aspect ratio integrity. This transformation is ideal when you must ensure that specific image elements remain visible after resizing. The Sub parameters:
Pattern:
| ||||||
ExamplesCreate a 500x500 crop focused on the point [1337,709] from the top-left corner.
Create a 400x100 vertical crop focused on the point [692,466] from the top-left corner.
|
Parameter | Description |
---|---|
| Smart Crop. This parameter automatically identifies key image features and performs resizing and cropping while preserving the key image features. Smart Crop requires either the |
Example
|
Parameter | Description |
---|---|
| Controls output image compression level.
|
Example
|
Parameter | Description |
---|---|
| Applies a Gaussian blur to the image.
|
Example
|
Parameter | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Overlays another image with a specified position and size on top of the source image. Sub parameters:
Constraints:
Pattern:
| |||||||||||||||||||||||||
ExamplesPlace third-party image
Place Photo Center image
|
Parameter | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Expands the canvas of an image by adding borders or extra space. The canvas dimensions must be larger than the original image. Otherwise, the image gets cropped. Sub parameters:
Direction parameters The direction parameter determines the image placement within the new canvas as follows:
Pattern:
| ||||||||||||||||||||||||||||||||||||
Examples
Expand the canvas by 100 pixels on both dimensions to produce a white/empty border. Example image
Add a second image YXWVUTSRQPONMLKJIHGFEDCBA to the right of the original image to make a 3840x1080 composite. Example image
Add a second image YXWVUTSRQPONMLKJIHGFEDCBA to the left of the original image to make a 3840x1080 composite. Example image
Add a second image YXWVUTSRQPONMLKJIHGFEDCBA to the right of the original image and resize that output to 600 pixels wide. Example image
|
Parameter | Description |
---|---|
| Background color. This parameter applies a hexadecimal color code to an image background. |
ExamplesApply a black background to a transparent PNG. Example image
Add a red border by expanding the canvas by 100 pixels on both dimensions. Example image
|
Response Codes
The following table describes the status codes after Resizer v2 processes your request:
Code | Meaning | Description |
---|---|---|
200 | OK | Successful |
400 | Bad Request | Malformed parameters |
403 | Forbidden | - Image is unpublished - Auth is invalid - External image had 403 |
404 | Not Found | - Arc ID doesn’t exist - External image reference had 404 |
500 | Internal Server Error | Image Manager/EdgeWorker error |
502 | Bad Gateway | Upstream error for source image retrieval |
504 | Gateway Time-out | Upstream timeout for source image retrieval |