Actions23
- Upload Actions
- Transform Actions
- Asset Actions
- Widget Actions
- Library Actions
- Asset (Legacy, by Public ID) Actions
Transform → Image: Crop
AI-generatedOverview
This node operation performs image cropping transformations using Cloudinary's media management service. It allows users to crop images by specifying exact dimensions or an aspect ratio, with options to focus on specific parts of the image such as auto-detected important regions, faces, or the center. Additionally, it supports generative fill to extend images with AI-generated content instead of cropping, which is useful for creative image editing and enhancement workflows.
Use Case Examples
- Cropping a product image to a specific width and height for consistent display on an e-commerce site.
- Cropping a video thumbnail to a 16:9 aspect ratio focusing on the detected face for better visual appeal.
- Using generative fill to extend an image background creatively when resizing without losing important content.
Properties
| Name | Meaning |
|---|---|
| Public ID | The unique identifier of the asset in Cloudinary, including any folder path but excluding the file extension. This is required to specify which image to crop. |
| Type | The Cloudinary delivery type indicating the source or method of delivery for the asset. Usually set to 'Upload' for public assets. Other types include social media sources and private or authenticated assets, which require signed URLs not generated by this node. |
| Continue From Transformation | An optional existing transformation string to prepend before this crop operation, allowing chaining of multiple transformations into one delivery URL. |
| Crop By | Determines whether cropping is done by exact dimensions or by aspect ratio. |
| Width | Target width in pixels for cropping when cropping by dimensions. |
| Height | Target height in pixels for cropping when cropping by dimensions. |
| Aspect Ratio | Aspect ratio specified as width:height or decimal for cropping when cropping by aspect ratio. |
| Width (Aspect Ratio) | Optional target width in pixels when cropping by aspect ratio; height is derived automatically. |
| Focus | Specifies which part of the image to keep in focus during cropping, such as auto-detected important regions, faces, or center. |
| Generative Fill | If enabled, extends the image with AI-generated content to reach the target shape instead of cropping, useful for creative padding. |
| Generative Fill Prompt | Optional text prompt guiding the AI-generated fill content when generative fill is enabled. |
| Additional Options | Additional transformation options such as asset version to bust CDN caches. |
Output
JSON
transformation- The resulting Cloudinary transformation string representing the crop operation.url- The full delivery URL for the cropped image asset.
Dependencies
- Cloudinary API credentials including cloud name, API key, and API secret
Troubleshooting
- Ensure the Public ID is correct and includes the folder path but excludes the file extension to avoid asset not found errors.
- Using delivery types like 'Private' or 'Authenticated' requires signed URLs which this node does not generate; such URLs will fail to load unless signed externally.
- When using generative fill, note that it applies only to non-transparent images and may incur additional transformation credits and asynchronous rendering on first request.
- If chaining transformations, ensure the 'Continue From Transformation' input is correctly set to the previous transformation string to avoid malformed URLs.
Links
- Cloudinary Image Cropping Documentation - Official Cloudinary documentation on image cropping transformations.
- Cloudinary Generative Fill - Details on using generative AI to extend images with Cloudinary.