Cloudinary icon

Cloudinary

Upload images and videos, build optimized transformation and delivery URLs, generate video players, and manage, search, tag, and edit metadata in your Cloudinary media library

Transform → Image: Resize

AI-generated

Overview

This node operation performs image resizing transformations using Cloudinary's media management service. It allows users to specify the public ID of an image asset and resize it to target dimensions with various fitting options such as limiting size, fitting within dimensions, padding with colors, or scaling exactly. This operation is useful for preparing images for different display contexts, optimizing image delivery, or creating thumbnails. For example, resizing product images to fit a specific layout on a website or generating smaller versions of images for faster loading on mobile devices.

Use Case Examples

  1. Resize an image to a width of 800 pixels while maintaining aspect ratio by setting height to 0 and fit mode to 'limit'.
  2. Resize an image to fit within 800x600 pixels and pad the remaining space with a blurred background color.
  3. Chain this resize operation with an image optimization operation to both resize and optimize images for web delivery.

Properties

Name Meaning
Public ID The unique identifier of the image asset in Cloudinary, including any folder path but excluding the file extension. This is required to specify which image to resize.
Type The Cloudinary delivery type indicating the source or method of delivery for the asset. Usually set to 'Upload' for public assets. Other types like 'Private' or social media sources require signed URLs which are not supported by this node yet.
Continue From Transformation An optional existing transformation string to prepend to this resize operation, allowing chaining of multiple transformations into one delivery URL.
Width The target width in pixels for the resized image. Set to 0 to size by height only.
Height The target height in pixels for the resized image. Set to 0 to size by width only.
Fit How the image is fitted to the requested dimensions, with options to limit resizing, fit within dimensions, pad with colors, or scale exactly.
Pad Background The color used to fill the padded area when using pad fit modes. Options include black (default), auto (predominant color), blurred, or a solid color.
Background Color A named color or hex value used as the pad background color when 'Solid Color' is selected.

Output

JSON

  • transformation - The resulting Cloudinary transformation string representing the resize operation, which can be used to build the delivery URL for the resized image.

Dependencies

  • Cloudinary API credentials including cloud name, API key, and API secret are required to authenticate and perform transformations.

Troubleshooting

  • If the public ID is incorrect or the asset does not exist, the node will fail to generate a valid transformation URL.
  • Using delivery types like 'Private' or 'Authenticated' without signed URL support will cause the delivery URL to fail to load.
  • Setting both width and height to 0 will result in an invalid resize operation; at least one dimension should be specified.
  • Incorrect color format for pad background color may cause unexpected padding results.

Links

Discussion