Documentation Index

Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt

Use this file to discover all available pages before exploring further.

Image & Video APIs

Image transformation recipes

Last updated: Nov-09-2026

This section contains step-by-step recipes for common image transformation goals.

Each recipe gives you a working transformation URL that you can adapt, and explains how it works.

Recipe Description
How do I crop an image around a person so their whole body stays in the frame? Crop to an exact size such as 1200x1600 and keep the whole person in the frame, with g_person and generative fill, or by trimming and padding.
How do I add a straight horizontal line to an image? Draw a line across a photo (not a border) by overlaying and stretching a 1x1 pixel image, and change its color, thickness, and position.
How do I resize an image on a fixed canvas with 20% padding on all sides? Shrink an image so it sits inside a fixed-size canvas, such as 1200x1500, with an even margin on every edge.
How do I make an Instagram Story image with a photo on top and text below? Build a 9:16 story image from a photo in the top half and several centered lines of text below it, in a single URL.
How do I add a solid color shape over part of an image? Overlay a stretched 1x1 pixel image to cover or highlight part of an image, such as a face, and change its color, position, and opacity.
How do I offset the crop position when cropping around a face? Learn why x and y don't move a c_crop with g_face, and how to adjust the crop around a detected face with zoom or a two-step crop.

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars