Image transformations

Whether your web or mobile application delivers your organization's own carefully selected images, images uploaded by your end users (UGC), or both, you probably need to adjust the originals to fit the graphic design of your website or mobile application.

Cloudinary's dynamic URL transformations enable you to achieve those goals programmatically and on the fly without the need for graphic designers and fancy editing tools.

You can build these URLs manually in your code, or take advantage of Cloudinary's SDKs, which enable you to write your transformation code using intuitive syntax designed for your preferred programming language or framework and let the SDK automatically build these URLs for you.

Important
Your account's pricing plan is in part dependent on the total number of transformation operations performed during a billing cycle. These are primarily counted when Cloudinary generates a new 'derived resource' from an asset based on a transformation URL. For complete details, see How are transformations counted?

Here are just a few examples of some popular use cases that you can accomplish on the fly by combining Cloudinary transformations. Click each image to see the URL parameters applied in each case:

Auto-crop profile photos Convert format, round,
change aspect ratio & crop to face,
add outlines & shadows
Pixelate detected faces Place, style, and format
image and text layers
Displace images on products Apply special effects like
cartoonify and brightness,
rotate to any angle

 

See also: Video Transformations

Overview

Cloudinary allows you to easily transform your images on the fly to any required format, style and dimension, and apply effects and other visual enhancements. You can also optimize your images to deliver them with minimal file size alongside high visual quality for an improved user experience and minimal bandwidth. You can do all of this by implementing dynamic image transformation and delivery URLs. Your transformed images are then delivered to your users through a fast CDN with optimized caching.

With image transformations, you can:

Related topics
The rest of this page describes the basics of working with Cloudinary image transformations.

The other pages in this guide provide details and use case examples on the various types of image transformations you can apply to your images.

The Transformation URL API Reference details every transformation parameter available for both images and videos.

Quick example

Below you can see the transformation URL and corresponding SDK code for generating an image with several transformation parameters applied. This transformation generates and delivers an image that is initially cropped to a 400x400 image that automatically focusses on the face, then rounded to a circle and finally, scaled down to a width of 200 pixels.

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("lady.jpg", :transformation=>[
  {:gravity=>"face", :height=>400, :width=>400, :crop=>"crop"},
  {:radius=>"max"},
  {:width=>200, :crop=>"scale"}
  ])
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('lady.jpg'))
  ->resize(Resize::crop()->width(400)
->height(400)
  ->gravity(
  Gravity::focusOn(
  FocusOn::face()))
  )
  ->roundCorners(RoundCorners::max())
  ->resize(Resize::scale()->width(200));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("lady.jpg", array("transformation"=>array(
  array("gravity"=>"face", "height"=>400, "width"=>400, "crop"=>"crop"),
  array("radius"=>"max"),
  array("width"=>200, "crop"=>"scale")
  )))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("lady.jpg").image(transformation=[
  {'gravity': "face", 'height': 400, 'width': 400, 'crop': "crop"},
  {'radius': "max"},
  {'width': 200, 'crop': "scale"}
  ])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("lady.jpg", {transformation: [
  {gravity: "face", height: 400, width: 400, crop: "crop"},
  {radius: "max"},
  {width: 200, crop: "scale"}
  ]})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation()
  .gravity("face").height(400).width(400).crop("crop").chain()
  .radius("max").chain()
  .width(200).crop("scale")).imageTag("lady.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
// This code example is not currently available.
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('lady.jpg', {transformation: [
  {gravity: "face", height: 400, width: 400, crop: "crop"},
  {radius: "max"},
  {width: 200, crop: "scale"}
  ]}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("lady.jpg", {transformation: [
  {gravity: "face", height: 400, width: 400, crop: "crop"},
  {radius: "max"},
  {width: 200, crop: "scale"}
  ]})
React (@cloudinary/react 1.x):
Copy to clipboard
// This code example is not currently available.
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="lady.jpg" >
  <Transformation gravity="face" height="400" width="400" crop="crop" />
  <Transformation radius="max" />
  <Transformation width="200" crop="scale" />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="lady.jpg" >
  <cld-transformation gravity="face" height="400" width="400" crop="crop" />
  <cld-transformation radius="max" />
  <cld-transformation width="200" crop="scale" />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
// This code example is not currently available.
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="lady.jpg" >
  <cl-transformation gravity="face" height="400" width="400" crop="crop">
  </cl-transformation>
  <cl-transformation radius="max">
  </cl-transformation>
  <cl-transformation width="200" crop="scale">
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Gravity("face").Height(400).Width(400).Crop("crop").Chain()
  .Radius("max").Chain()
  .Width(200).Crop("scale")).BuildImageTag("lady.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setGravity("face").setHeight(400).setWidth(400).setCrop("crop").chain()
  .setRadius("max").chain()
  .setWidth(200).setCrop("scale")).generate("lady.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation()
  .gravity("face").height(400).width(400).crop("crop").chain()
  .radius("max").chain()
  .width(200).crop("scale")).generate("lady.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
// This code example is not currently available.

Original Original

 

Transformed image

 

 

Transformed image

Transformation URL syntax

Your Cloudinary media assets are accessed using simple delivery HTTP or HTTPS URLs, which are then delivered to users via a worldwide fast CDN. The URL contains the public ID of the requested asset plus any optional transformation parameters. The public ID is the unique identifier of the asset and is either defined when uploading the asset to your Cloudinary account, or automatically assigned by Cloudinary (see Uploading Assets for more details on the various options for specifying the public ID).

Generating transformation URLs with Cloudinary SDKs

Cloudinary's SDKs automatically build the transformation URL for you. They allow you to continue working in your preferred developer framework and also provide helper methods to simplify building image tags and image transformation URLs.

Tip
You can also create your transformation URLs using the Transformation Editor or new Transformation Builder (Beta). Alternatively, you can take one of our Cookbook recipes as a starting point and then further modify it in the Transformation Editor to fit your needs. The editor and builder generate the URL and SDK code for the transformation you define so that you can copy it in the language you require.

Transformation URL structure

The default Cloudinary asset delivery URL has the following structure:

https://res.cloudinary.com/<cloud_name>/<asset_type>/<delivery_type>/<transformations>/<version>/<public_id>.<extension>
element description
cloud_name The name of your Cloudinary account, a unique public identifier for URL building and API access.

Note: Paid customers on the Advanced plan or higher can request to use a private CDN or CNAME to customize the domain name used for your delivery URLs.

asset_type The type of asset to deliver. Valid values: image, video, or raw.

  • The image type includes still image and photo formats, animated images, PDFs, layered files, such as TIFF and PSD, and others.
  • The video type includes video and audio files.
  • The raw type includes any file uploaded to Cloudinary that does not fit in one of the above categories. In general, transformations cannot be performed on raw assets, but they can be delivered as-is for download purposes, or in some cases, they may be used in conjunction with your image or video transformations.

delivery_type The storage or delivery type. For details on all possible types, see Delivery types.
transformations Optional. One or more comma-separated transformation parameters in a single URL component, or a set of chained transformations in multiple URL components (separated by slashes). When the transformation URL is first accessed, the derived media file is created on the fly and delivered to your user. The derived file is also cached on the CDN and is immediately available to all subsequent users requesting the same asset.
version Optional. You can include the version in your delivery URL to bypass the cached version on the CDN and force delivery of the latest asset (in the case that an asset has been overwritten with a newer file). For simplicity, the version component is generally not included in the example URLs on this page. For details, see Asset versions.
public_id The unique identifier of the asset, including the folder structure if relevant.
extension Optional. The file extension of the requested delivery format for the asset. Default: The originally uploaded format or the format determined by f_auto, when used.

In the most general case of simply delivering images that were uploaded to your Cloudinary account without any transformations, the delivery URL will be in the format:

https://res.cloudinary.com/<cloud_name>/image/upload/<public_id>.<extension>

For example, delivering the image with a public ID of: sample , uploaded to Cloudinary's demo account in jpg format:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg")
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg")
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image()
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg")
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation().imageTag("sample.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg");
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.jpg').toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg")
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg");
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" >

</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.jpg" >

</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg");
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" >

</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.BuildImageTag("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().generate("sample.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg") 
}.generate()
Sample image

The following shows an example of delivering the same image with transformation parameters, where the image is scaled and cropped to fill a 250x300 pixel size and a blurring effect is applied:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg", :transformation=>[
  {:height=>300, :width=>250, :crop=>"fill"},
  {:effect=>"blur:300"}
  ])
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'))
  ->resize(Resize::fill()->width(250)
->height(300))
  ->effect(Effect::blur()->strength(300));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", array("transformation"=>array(
  array("height"=>300, "width"=>250, "crop"=>"fill"),
  array("effect"=>"blur:300")
  )))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(transformation=[
  {'height': 300, 'width': 250, 'crop': "fill"},
  {'effect': "blur:300"}
  ])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", {transformation: [
  {height: 300, width: 250, crop: "fill"},
  {effect: "blur:300"}
  ]})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation()
  .height(300).width(250).crop("fill").chain()
  .effect("blur:300")).imageTag("sample.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg")
  .resize(fill().width(250).height(300))
  .effect(blur().strength(300));
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.jpg', {transformation: [
  {height: 300, width: 250, crop: "fill"},
  {effect: "blur:300"}
  ]}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg", {transformation: [
  {height: 300, width: 250, crop: "fill"},
  {effect: "blur:300"}
  ]})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg")
  .resize(fill().width(250).height(300))
  .effect(blur().strength(300));
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" >
  <Transformation height="300" width="250" crop="fill" />
  <Transformation effect="blur:300" />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.jpg" >
  <cld-transformation height="300" width="250" crop="fill" />
  <cld-transformation effect="blur:300" />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg")
  .resize(fill().width(250).height(300))
  .effect(blur().strength(300));
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" >
  <cl-transformation height="300" width="250" crop="fill">
  </cl-transformation>
  <cl-transformation effect="blur:300">
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Height(300).Width(250).Crop("fill").Chain()
  .Effect("blur:300")).BuildImageTag("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setHeight(300).setWidth(250).setCrop("fill").chain()
  .setEffect("blur:300")).generate("sample.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation()
  .height(300).width(250).crop("fill").chain()
  .effect("blur:300")).generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg")
   resize(Resize.fill() { width(250)
 height(300) })
   effect(Effect.blur() { strength(300) }) 
}.generate()
Image cropped to 300x200

Transformation URL tips

  • For customers with a Custom Domain Name (CNAME) - available for Cloudinary's Advanced plan and above - the basic image delivery URL becomes: https://<custom domain name>/image/upload....
  • You can convert and deliver your image in other supported image formats by simply changing the image format file extension. For details, see Delivering in a different format.
  • You can append an SEO-friendly suffix to your URL by replacing the image/upload element of the URL with images and then appending the desired suffix with a slash (/) after the public ID and before the extension. For example, if you have a cooking image with a random public ID like: abc1def2, you can deliver your image as:

    https://res.cloudinary.com/<cloud_name>/images/upload/a12345/cooking.jpg

    For more details, see Dynamic SEO suffixes.

  • You can also use shortcut URLs when specifically delivering image files using the default upload type. With Cloudinary's Root Path URL feature, the <asset_type> and <delivery_type> elements can be omitted from the URL (they automatically default to the values image and upload respectively). For example, the Root Path shortcut delivery URL for the cropped image above is:

    https://res.cloudinary.com/demo/c_crop,h_200,w_300/sample.jpg

Transformation URL video tutorial

The following video provides a quick demonstration of how dynamic transformation URLs work with both images and videos.

Delivery types

The delivery type element of the URL provides an indication about the way the asset will be delivered, although in most cases, the delivery type value is determined at the time that the asset is stored in your account.

The following delivery type values are supported:

Delivery type Description Learn more
upload The default delivery type for uploaded assets. In most cases, this delivery type indicates that the asset is publicly available. However, there are options you can use to restrict access to assets with an upload delivery type. This includes strict transformations and access mode settings) Upload API
private The URL for the original asset can be accessed only with a signed URL. Transformed versions of the asset are publicly available (unless strict transformations are also defined). Uploading private assets
authenticated Both original and transformed versions of the asset can be accessed only with a signed URL or an authentication token. Uploading authenticated assets

Delivering authenticated assets

list Generates a list of assets that have a specified tag.
Note: This isn't a delivery type in the classic sense, in that it doesn't relate to an individual asset. However, to use this feature, you specify list in the delivery type element of the URL.
Client-side asset lists
fetch Enables transforming and delivering remote images on the fly. Fetch remote images
facebook
twitter
twitter_name
gravatar
Fetches a profile picture from Facebook, Twitter, or other specified social delivery type based on a specified ID or name. Social media profile pictures
youtube
hulu
vimeo
animoto
worldstarhiphop
dailymotion
Delivers a thumbnail image generated from the specified video from a public video site. Fetching thumbnails of public videos
multi Enables you to deliver a single animated image (GIF, PNG or WebP) from all image assets that have been assigned a specified tag. Multi method

Creating animated images

text Enables you to generate an image in your account from a specified textual string along with style parameters for use as an image overlay. Text method
asset Relevant only for the Ruby on Rails SDK. Delivers files that were uploaded using the sync_static command. Static files

Tip
You can search for assets by delivery type using the Advanced Search in the Media Library. The most common types can be selected directly in the Type section of the General search tab. All other types can be selected from the More types list.

Parameter types

There are two types of transformation parameters:

  • Action parameters: Parameters that perform a specific transformation on the asset.
  • Qualifier parameters: Parameters that do not perform an action on their own, but rather alter the default behavior or otherwise adjust the outcome of the corresponding action parameter.

It's best practice to include only one action parameter per URL component.

If you want to apply multiple actions in a single transformation URL, apply them in separate chained components, where each action is performed on the result of the previous one.

Note
In some of the Cloudinary SDKs, this action separation rule is enforced.

In contrast, qualifier parameters must be included in the component with the action parameter they qualify.

  • Most qualifiers are optional, meaning the related action parameter can be used independently, but you can add optional qualifiers to modify the default behavior.
  • In some cases, an action parameter requires one or more qualifiers to fully define the transformation behavior.
  • There are a few parameters that can be used independently as action parameters, but can also be used in other scenarios as a qualifier for another action.

For example, the transformation below includes a crop action, a rounding action, and 2 effect actions. The qualifier transformations included in each action define additional adjustments on the transformation action's behavior:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("actor.png", :transformation=>[
  {:aspect_ratio=>"1.0", :gravity=>"face", :width=>0.6, :zoom=>0.7, :crop=>"thumb"},
  {:radius=>"max"},
  {:color=>"brown", :effect=>"outline"},
  {:color=>"grey", :effect=>"shadow", :x=>30, :y=>55}
  ])
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('actor.png'))
  ->resize(Resize::thumbnail()->width(0.6)
->aspectRatio(1.0)
->zoom(0.7)
  ->gravity(
  Gravity::focusOn(
  FocusOn::face()))
  )
  ->roundCorners(RoundCorners::max())
  ->effect(Effect::outline()
  ->color(Color::BROWN)
  )
  ->effect(Effect::shadow()
  ->color(Color::GREY)
->offsetX(30)
->offsetY(55));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("actor.png", array("transformation"=>array(
  array("aspect_ratio"=>"1.0", "gravity"=>"face", "width"=>"0.6", "zoom"=>"0.7", "crop"=>"thumb"),
  array("radius"=>"max"),
  array("color"=>"brown", "effect"=>"outline"),
  array("color"=>"grey", "effect"=>"shadow", "x"=>30, "y"=>55)
  )))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("actor.png").image(transformation=[
  {'aspect_ratio': "1.0", 'gravity': "face", 'width': "0.6", 'zoom': "0.7", 'crop': "thumb"},
  {'radius': "max"},
  {'color': "brown", 'effect': "outline"},
  {'color': "grey", 'effect': "shadow", 'x': 30, 'y': 55}
  ])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("actor.png", {transformation: [
  {aspect_ratio: "1.0", gravity: "face", width: "0.6", zoom: "0.7", crop: "thumb"},
  {radius: "max"},
  {color: "brown", effect: "outline"},
  {color: "grey", effect: "shadow", x: 30, y: 55}
  ]})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation()
  .aspectRatio("1.0").gravity("face").width(0.6).zoom(0.7).crop("thumb").chain()
  .radius("max").chain()
  .color("brown").effect("outline").chain()
  .color("grey").effect("shadow").x(30).y(55)).imageTag("actor.png");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
// This code example is not currently available.
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('actor.png', {transformation: [
  {aspectRatio: "1.0", gravity: "face", width: "0.6", zoom: "0.7", crop: "thumb"},
  {radius: "max"},
  {color: "brown", effect: "outline"},
  {color: "grey", effect: "shadow", x: 30, y: 55}
  ]}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("actor.png", {transformation: [
  {aspect_ratio: "1.0", gravity: "face", width: "0.6", zoom: "0.7", crop: "thumb"},
  {radius: "max"},
  {color: "brown", effect: "outline"},
  {color: "grey", effect: "shadow", x: 30, y: 55}
  ]})
React (@cloudinary/react 1.x):
Copy to clipboard
// This code example is not currently available.
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="actor.png" >
  <Transformation aspectRatio="1.0" gravity="face" width="0.6" zoom="0.7" crop="thumb" />
  <Transformation radius="max" />
  <Transformation color="brown" effect="outline" />
  <Transformation color="grey" effect="shadow" x="30" y="55" />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="actor.png" >
  <cld-transformation aspect-ratio="1.0" gravity="face" width="0.6" zoom="0.7" crop="thumb" />
  <cld-transformation radius="max" />
  <cld-transformation color="brown" effect="outline" />
  <cld-transformation color="grey" effect="shadow" x="30" y="55" />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
// This code example is not currently available.
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="actor.png" >
  <cl-transformation aspect-ratio="1.0" gravity="face" width="0.6" zoom="0.7" crop="thumb">
  </cl-transformation>
  <cl-transformation radius="max">
  </cl-transformation>
  <cl-transformation color="brown" effect="outline">
  </cl-transformation>
  <cl-transformation color="grey" effect="shadow" x="30" y="55">
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .AspectRatio("1.0").Gravity("face").Width(0.6).Zoom(0.7).Crop("thumb").Chain()
  .Radius("max").Chain()
  .Color("brown").Effect("outline").Chain()
  .Color("grey").Effect("shadow").X(30).Y(55)).BuildImageTag("actor.png")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setAspectRatio("1.0").setGravity("face").setWidth(0.6).setZoom(0.7).setCrop("thumb").chain()
  .setRadius("max").chain()
  .setColor("brown").setEffect("outline").chain()
  .setColor("grey").setEffect("shadow").setX(30).setY(55)).generate("actor.png")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation()
  .aspectRatio("1.0").gravity("face").width(0.6).zoom(0.7).crop("thumb").chain()
  .radius("max").chain()
  .color("brown").effect("outline").chain()
  .color("grey").effect("shadow").x(30).y(55)).generate("actor.png");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
// This code example is not currently available.
Multiple transformation actions in a chained transformation

Note
The URL tab above shows the URL as it looks when generated by an SDK. SDKs always generate the parameters within a specific URL component in alphabetical order (thus some qualifiers in the URL may come before the action that they qualify).

In this transformation:

Transformation flags

Transformation flags alter default transformation behavior. In some cases, they alter the default behavior of the transformation URL as a whole. In other cases, they alter the behavior of one or more specific transformation parameters that must be used together in the same URL component.

In general, tens of flags are available that can alter delivery and format, cropping and positioning, overlays, metadata and color profiles, as well as PDF and text behaviors, just to name a few.

For example:

  • fl_attachment alters the normal behavior of the overall transformation. Instead of delivering an asset in a web page, it causes the transformed media file to be downloaded as an attachment. This flag can be used independently of other transformations.

  • fl_relative modifies the way overlay resize parameters are evaluated. This flag can only be used in conjunction with the overlay (l_) parameter.

  • fl_layer_apply tells Cloudinary to apply all chained transformations, until a transformation component that includes this flag, on the last added overlay or underlay asset instead of applying them on the base asset. This flag acts as an indicator to close the layer section of the transformation, similar to a closing bracket. Placement definitions for how the layer should be applied, such as gravity and offsets are also defined in the component with this flag.

For details on all available transformation flags, see the flag section of the Transformation Reference.

Generating secure HTTPS URLs using SDKs

For backward compatibility reasons, many of Cloudinary's earlier SDK major versions generate http URLs by default. When using one of these SDKs, you can instruct the SDK to generate https URLs by setting the secure parameter to true, either globally as part of your SDK configuration, or locally in each transformation operation. For example, delivering the sample image with HTTPS:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg", :secure=>true)
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", array("secure"=>true))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(secure=True)
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", {secure: true})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation().secure(true).imageTag("sample.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg");
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.jpg', {secure: true}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg", {secure: true})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg");
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" secure="true">

</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.jpg" secure="true">

</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg");
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" secure="true">

</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Secure(true).BuildImageTag("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().generate("sample.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().secure(true).generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg") 
}.generate()
HTTPS delivered image

Note
For SDK major versions first released in 2020 or later, the secure parameter is true by default.

Verbose vs non-verbose syntax

Some transformation parameters with multiple options offer two alternative syntaxes for defining the option values:

  • Verbose, unordered: Each option of the transformation (whether required or optional) is specified in the verbose format name_value and each option is separated by a colon (:) or semi-colon (;) depending on the transformation.

    The options can be specified in any order, and you only need to include those that you want (or are required) to define.

    With this syntax, you can also choose to specify only the options for which you don't want to use default values and default values will be applied for the others.

  • Non-verbose, ordered: Transformation options are specified only by values, and must be entered in the pre-defined option order for that transformation. All values from the syntax to the left of the value you want to supply must also be entered.

Transformations that support both verbose and non-verbose URL syntax are indicated as such in the Transformation Reference. When both are supported, SDKs always output the verbose syntax.

Verbose vs non-verbose example

The theme effect supports the color and photosensitivity options, but you can specify them in a different order using verbose syntax. For example:

e_theme:photosensitivity_110:color_black

However, when using non-verbose syntax, you must specify the parameters in order. Therefore, even if you only want to change the default behavior of the photosensitivity (last) option, you must still specify the value to use for the color (first) option:

e_theme:black:110

Chained Transformations

Cloudinary supports powerful transformations that are applied on the fly using dynamic URLs. You can combine multiple transformation actions together as part of a single delivery request, e.g., crop an image and then add a border to it.

In general, it's best practice to chain each transformation action in your URL as a separate component in the chain.

To support chained transformations, Cloudinary's transformation URLs allow you to include multiple transformation components, each separated by a slash (/), where each of the transformation components is executed on the result of the previous one. Cloudinary's SDKs can apply multiple transformation components by specifying the transformation parameter and setting it to an array of transformation maps.

Examples with the uploaded JPG image named flower:

  1. Two chained transformations: fill to a 150px square and then round to a circle:

    Ruby (cloudinary 1.x):
    Copy to clipboard
    cl_image_tag("flower.jpg", :transformation=>[
      {:aspect_ratio=>"1.0", :width=>150, :crop=>"fill"},
      {:radius=>"max"}
      ])
    PHP (cloudinary_php 2.x):
    Copy to clipboard
    (new ImageTag('flower.jpg'))
      ->resize(Resize::fill()->width(150)
    ->aspectRatio(1.0))
      ->roundCorners(RoundCorners::max());
    PHP (cloudinary_php 1.x (legacy)):
    Copy to clipboard
    cl_image_tag("flower.jpg", array("transformation"=>array(
      array("aspect_ratio"=>"1.0", "width"=>150, "crop"=>"fill"),
      array("radius"=>"max")
      )))
    Python (cloudinary 1.x):
    Copy to clipboard
    CloudinaryImage("flower.jpg").image(transformation=[
      {'aspect_ratio': "1.0", 'width': 150, 'crop': "fill"},
      {'radius': "max"}
      ])
    Node.js (cloudinary 1.x):
    Copy to clipboard
    cloudinary.image("flower.jpg", {transformation: [
      {aspect_ratio: "1.0", width: 150, crop: "fill"},
      {radius: "max"}
      ]})
    Java (cloudinary 1.x):
    Copy to clipboard
    cloudinary.url().transformation(new Transformation()
      .aspectRatio("1.0").width(150).crop("fill").chain()
      .radius("max")).imageTag("flower.jpg");
    JS (@cloudinary/url-gen 1.x):
    Copy to clipboard
    // This code example is not currently available.
    JS (cloudinary-core 2.x (legacy)):
    Copy to clipboard
    cloudinary.imageTag('flower.jpg', {transformation: [
      {aspectRatio: "1.0", width: 150, crop: "fill"},
      {radius: "max"}
      ]}).toHtml();
    jQuery (cloudinary-jquery 2.x):
    Copy to clipboard
    $.cloudinary.image("flower.jpg", {transformation: [
      {aspect_ratio: "1.0", width: 150, crop: "fill"},
      {radius: "max"}
      ]})
    React (@cloudinary/react 1.x):
    Copy to clipboard
    // This code example is not currently available.
    React (cloudinary-react 1.x):
    Copy to clipboard
    <Image publicId="flower.jpg" >
      <Transformation aspectRatio="1.0" width="150" crop="fill" />
      <Transformation radius="max" />
    </Image>
    Vue.js (cloudinary-vue 1.x):
    Copy to clipboard
    <cld-image public-id="flower.jpg" >
      <cld-transformation aspect-ratio="1.0" width="150" crop="fill" />
      <cld-transformation radius="max" />
    </cld-image>
    Angular (@cloudinary/ng 1.x):
    Copy to clipboard
    // This code example is not currently available.
    Angular (@cloudinary/angular-5.x 1.x (legacy)):
    Copy to clipboard
    <cl-image public-id="flower.jpg" >
      <cl-transformation aspect-ratio="1.0" width="150" crop="fill">
      </cl-transformation>
      <cl-transformation radius="max">
      </cl-transformation>
    </cl-image>
    .NET (CloudinaryDotNet 1.x):
    Copy to clipboard
    cloudinary.Api.UrlImgUp.Transform(new Transformation()
      .AspectRatio("1.0").Width(150).Crop("fill").Chain()
      .Radius("max")).BuildImageTag("flower.jpg")
    iOS (cloudinary 3.x):
    Copy to clipboard
    imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
      .setAspectRatio("1.0").setWidth(150).setCrop("fill").chain()
      .setRadius("max")).generate("flower.jpg")!, cloudinary: cloudinary)
    Android (cloudinary-android 1.x):
    Copy to clipboard
    MediaManager.get().url().transformation(new Transformation()
      .aspectRatio("1.0").width(150).crop("fill").chain()
      .radius("max")).generate("flower.jpg");
    Kotlin (kotlin-url-gen 1.x):
    Copy to clipboard
    // This code example is not currently available.
    2 chained transformations applied to an image

  2. Four chained transformations: crop to 150x100 with a custom offset from the center, fill crop to 130x100, rotate by 20 degrees, and then scale down to 80%:

    Ruby (cloudinary 1.x):
    Copy to clipboard
    cl_image_tag("flower.jpg", :transformation=>[
      {:height=>100, :width=>150, :x=>380, :y=>250, :crop=>"crop"},
      {:height=>100, :width=>130, :crop=>"fill"},
      {:angle=>20},
      {:width=>0.8, :crop=>"scale"}
      ])
    PHP (cloudinary_php 2.x):
    Copy to clipboard
    (new ImageTag('flower.jpg'))
      ->resize(Resize::crop()->width(150)
    ->height(100)
    ->x(380)
    ->y(250))
      ->resize(Resize::fill()->width(130)
    ->height(100))
      ->rotate(Rotate::byAngle(20))
      ->resize(Resize::scale()->width(0.8));
    PHP (cloudinary_php 1.x (legacy)):
    Copy to clipboard
    cl_image_tag("flower.jpg", array("transformation"=>array(
      array("height"=>100, "width"=>150, "x"=>380, "y"=>250, "crop"=>"crop"),
      array("height"=>100, "width"=>130, "crop"=>"fill"),
      array("angle"=>20),
      array("width"=>"0.8", "crop"=>"scale")
      )))
    Python (cloudinary 1.x):
    Copy to clipboard
    CloudinaryImage("flower.jpg").image(transformation=[
      {'height': 100, 'width': 150, 'x': 380, 'y': 250, 'crop': "crop"},
      {'height': 100, 'width': 130, 'crop': "fill"},
      {'angle': 20},
      {'width': "0.8", 'crop': "scale"}
      ])
    Node.js (cloudinary 1.x):
    Copy to clipboard
    cloudinary.image("flower.jpg", {transformation: [
      {height: 100, width: 150, x: 380, y: 250, crop: "crop"},
      {height: 100, width: 130, crop: "fill"},
      {angle: 20},
      {width: "0.8", crop: "scale"}
      ]})
    Java (cloudinary 1.x):
    Copy to clipboard
    cloudinary.url().transformation(new Transformation()
      .height(100).width(150).x(380).y(250).crop("crop").chain()
      .height(100).width(130).crop("fill").chain()
      .angle(20).chain()
      .width(0.8).crop("scale")).imageTag("flower.jpg");
    JS (@cloudinary/url-gen 1.x):
    Copy to clipboard
    new CloudinaryImage("flower.jpg")
      .resize(crop().width(150).height(100).x(380).y(250))
      .resize(fill().width(130).height(100))
      .rotate(byAngle(20))
      .resize(scale().width(0.8));
    JS (cloudinary-core 2.x (legacy)):
    Copy to clipboard
    cloudinary.imageTag('flower.jpg', {transformation: [
      {height: 100, width: 150, x: 380, y: 250, crop: "crop"},
      {height: 100, width: 130, crop: "fill"},
      {angle: 20},
      {width: "0.8", crop: "scale"}
      ]}).toHtml();
    jQuery (cloudinary-jquery 2.x):
    Copy to clipboard
    $.cloudinary.image("flower.jpg", {transformation: [
      {height: 100, width: 150, x: 380, y: 250, crop: "crop"},
      {height: 100, width: 130, crop: "fill"},
      {angle: 20},
      {width: "0.8", crop: "scale"}
      ]})
    React (@cloudinary/react 1.x):
    Copy to clipboard
    //React SDK transformations are created using @cloudinary/url-gen.
    new CloudinaryImage("flower.jpg")
      .resize(crop().width(150).height(100).x(380).y(250))
      .resize(fill().width(130).height(100))
      .rotate(byAngle(20))
      .resize(scale().width(0.8));
    React (cloudinary-react 1.x):
    Copy to clipboard
    <Image publicId="flower.jpg" >
      <Transformation height="100" width="150" x="380" y="250" crop="crop" />
      <Transformation height="100" width="130" crop="fill" />
      <Transformation angle="20" />
      <Transformation width="0.8" crop="scale" />
    </Image>
    Vue.js (cloudinary-vue 1.x):
    Copy to clipboard
    <cld-image public-id="flower.jpg" >
      <cld-transformation height="100" width="150" x="380" y="250" crop="crop" />
      <cld-transformation height="100" width="130" crop="fill" />
      <cld-transformation angle="20" />
      <cld-transformation width="0.8" crop="scale" />
    </cld-image>
    Angular (@cloudinary/ng 1.x):
    Copy to clipboard
    //Angular SDK transformations are created using @cloudinary/url-gen.
    new CloudinaryImage("flower.jpg")
      .resize(crop().width(150).height(100).x(380).y(250))
      .resize(fill().width(130).height(100))
      .rotate(byAngle(20))
      .resize(scale().width(0.8));
    Angular (@cloudinary/angular-5.x 1.x (legacy)):
    Copy to clipboard
    <cl-image public-id="flower.jpg" >
      <cl-transformation height="100" width="150" x="380" y="250" crop="crop">
      </cl-transformation>
      <cl-transformation height="100" width="130" crop="fill">
      </cl-transformation>
      <cl-transformation angle="20">
      </cl-transformation>
      <cl-transformation width="0.8" crop="scale">
      </cl-transformation>
    </cl-image>
    .NET (CloudinaryDotNet 1.x):
    Copy to clipboard
    cloudinary.Api.UrlImgUp.Transform(new Transformation()
      .Height(100).Width(150).X(380).Y(250).Crop("crop").Chain()
      .Height(100).Width(130).Crop("fill").Chain()
      .Angle(20).Chain()
      .Width(0.8).Crop("scale")).BuildImageTag("flower.jpg")
    iOS (cloudinary 3.x):
    Copy to clipboard
    imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
      .setHeight(100).setWidth(150).setX(380).setY(250).setCrop("crop").chain()
      .setHeight(100).setWidth(130).setCrop("fill").chain()
      .setAngle(20).chain()
      .setWidth(0.8).setCrop("scale")).generate("flower.jpg")!, cloudinary: cloudinary)
    Android (cloudinary-android 1.x):
    Copy to clipboard
    MediaManager.get().url().transformation(new Transformation()
      .height(100).width(150).x(380).y(250).crop("crop").chain()
      .height(100).width(130).crop("fill").chain()
      .angle(20).chain()
      .width(0.8).crop("scale")).generate("flower.jpg");
    Kotlin (kotlin-url-gen 1.x):
    Copy to clipboard
    cloudinary.image {
      publicId("flower.jpg")
       resize(Resize.crop() { width(150)
     height(100)
     x(380)
     y(250) })
       resize(Resize.fill() { width(130)
     height(100) })
       rotate(Rotate.byAngle(20))
       resize(Resize.scale() { width(0.8F) }) 
    }.generate()
    4 chained transformations applied to an image

Named Transformations

A named transformation is a pre-defined set of transformation parameters that has been given a custom name for easy reference. Instead of applying each of the required transformations separately to an asset, you can apply a single named transformation to apply all the transformations defined for it. This makes it easy to:

  • Reuse transformations on multiple assets
  • Shorten complex transformation URLs
  • Hide the details of a transformation in your delivery URL.
  • Simplify the enabling/disabling of transformations in Strict Transformations mode.

Named transformations can include other named transformations, which allows you to define a chain of transformations to run on multiple assets more easily.

You can create and manage named transformations via the API or in the console UI using the Transformation Editor or the new Transformation Builder (Beta).

Named Transformation UI

Once the named transformation has been defined, you can transform an asset with the transformation parameter (t for URLs) and the name of your named transformation. For example t_instagram-auto-crop.

You can include user-defined variables in your named transformations, and then pass the value for the user-defined variable into the transformation from an external source. This enables creating a named transformation 'template' with a lot of flexibility.

For example, you could define a complex named transformation that includes a text overlay as a named transformation, using a user-defined variable for the text string value.

For more details, see user-defined variables. For a use-case example demonstrating named transformations with user-defined variables, see Named transformation with a user-defined variable.

You can also set named transformations as transformation presets, which enables you to preview how assets from your Media Library will look with different named transformations applied.

Keep in mind that named transformation may be applied to assets by other users and not all asset formats are supported for transformations. If an asset's original format doesn't support transformations, applying a named transformation to it will result in an error. See a list of supported image formats.

Note
Updating the transformation definition for a named transformation via the Admin API does not automatically update assets that were already derived/delivered with that named transformation. To apply the new definition to any already derived assets that use that named transformation, you must specifically invalidate those transformations or otherwise modify the other parameters in that delivery URL, so that the asset will be re-derived using the new definition.

However, when updating the transformation definition of a named transformation via the Management Console, if the named transformation is used in fewer than 1000 existing derived assets, those assets are automatically invalidated and will use the new named transformation definition the next time they are requested. If more than 1000 existing derived assets use the named transformation, then existing derived assets are not updated and only newly generated derived assets will use the new definition.

Creating named transformations

You can create a named transformation programmatically or using the Transformations UI in your Cloudinary console:

To create a named transformation programmatically, use the Transformations Admin API method. The following example defines a named transformation called small_profile_thumbnail that uses automatic cropping to resize assets to the required size for a particular application's thumbnail display:

Ruby (cloudinary 1.x):
Copy to clipboard
Cloudinary::Api.create_transformation('small_profile_thumbnail',
  {:width => 100, :height => 150, :crop => :fill, :gravity=>:auto})
PHP (cloudinary_php 2.x):
Copy to clipboard
$api->createTransformation("small_profile_thumbnail",
  [resize(Resize::fill()->width(200)->height(300)->gravity(Gravity::autoGravity()]);
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
$api->create_transformation("small_profile_thumbnail",
  ["width" => 100, "height" => 150, "crop" => "fill", "gravity" =>"auto"]);
Python (cloudinary 1.x):
Copy to clipboard
cloudinary.api.create_transformation("small_profile_thumbnail",
  dict(width = 100, height = 150, crop = "fill", "gravity" = "auto"))
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.v2.api
.create_transformation('small_profile_thumbnail',
  { width: 100, height: 150, crop: 'fill', gravity: 'auto' })
.then(result=>console.log(result));
Java (cloudinary 1.x):
Copy to clipboard
api.createTransformation("small_profile_thumbnail",
  new Transformation().width(150).height(100).crop("fill").gravity("auto").generate(),
  ObjectUtils.emptyMap());
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
var createTransformParams = new CreateTransformParams(){
  Name = "small_profile_thumbnail",
  Transformation = new Transformation().Width(100).Height(150).Crop("fill").Gravity("auto")};
cloudinary.CreateTransform(createTransformParams);
Go (cloudinary-go 1.x):
Copy to clipboard
resp, err := cld.Admin.CreateTransformation(ctx, admin.CreateTransformationParams{
        Name:         "small_profile_thumbnail",
        Transformation: "c_fill,g_auto,h_150,w_100"})
curl:
Copy to clipboard
curl \
  -d 'transformation=w_100,h_150,c_fill,g_auto' \
  -X POST \
  https://<API_KEY>:<API_SECRET>@api.cloudinary.com/v1_1/<CLOUD_NAME>/transformations/small_profile_thumbnail
cli:
Copy to clipboard
cld admin create_transformation "small_profile_thumbnail" '{"width": 150, "height": 100, "crop": "fill", "gravity": "auto"}'

For more details and examples, see the Create Transformation method in the Admin API Reference.

To create a named transformation using the console, you have a few options:

  1. Start with a cookbook recipe as a template and refine it to your needs before saving it with your chosen name. Cookbook UI
  2. View a list of all your dynamic transformations (those you generated and delivered on the fly) and save one of those with your chosen name.
  3. Create a new transformation from scratch using the Transformation Editor or Transformation Builder (Beta) and save with your chosen name.

Note
Names used for named transformations:

  • Must contain valid UTF8 characters only
  • Must not contain more than 1024 characters
  • Must not contain any of these characters: \, /, ?, &, #, %, ., ,, <, >

Once you've saved your named transformations, you can view a list of them on the Named Transformations page of the console. From here, you can edit, copy, or enable/disable Strict Transformations.

You can also select to include a transformation as a preset in the Media Library Asset Management page.

Transformation Builder (beta)

The Cloudinary Transformation Builder is a brand new UI designed to help you create and save your transformations in a simple and easy to use way. Here's some of the features and functionality you can get by using the builder:

  • Simple and intuitive UI for selecting and configuring transformation actions - easily discover actions and parameters as you build.
  • Transformations built as a series of self-contained actions so you can see the results of each one as you apply it.
  • URL and SDK code ready to copy and paste directly to your code.
  • Ability to update the default preview image to something from your own Media Library.

The builder has support for most common transformation actions. If the transformation action you are trying to apply is not listed, you can add an "Additional Transformation" action and use transformation URL syntax to specify your transformation. Alternatively, you can switch to the legacy editor to create your transformation.

Important
The Transformation Builder is currently in Beta. Some implementation details may change before the official release. The builder is enabled for all new customers. Follow the instructions below to check if it's available to you. If you don't have it enabled and would like access to the Beta, send us a support request and we will enable it for you.

Create a transformation using the Builder

To create a new transformation and verify you have access to the Transformation Builder, head to the transformations page and click Add New. If enabled, you should see the new transformation builder UI where you can start adding actions and building up your transformation. For a taste of what to expect, have a look at the screenshot below:

transformation builder

Named transformation examples

Below are some examples of using the following named transformations that have been defined for the Cloudinary demo account:

  • jpg_with_quality_30: Convert the image to a JPEG with 30% quality.
  • crop_400x400: Crop the image to 400x400 with center gravity.
  • fit_100x150: Fit the image into a 100x150 rectangle.

To create a version of the sample image based on the fit_100x150 transformation:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg", :transformation=>["fit_100x150"])
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'))
  ->namedTransformation(NamedTransformation::name("fit_100x150"));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", array("transformation"=>array("fit_100x150")))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(transformation=["fit_100x150"])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", {transformation: ["fit_100x150"]})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation().named("fit_100x150")).imageTag("sample.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg").namedTransformation(name("fit_100x150"));
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.jpg', {transformation: ["fit_100x150"]}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg", {transformation: ["fit_100x150"]})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg").namedTransformation(name("fit_100x150"));
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" >
  <Transformation transformation={["fit_100x150"]} />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.jpg" >
  <cld-transformation transformation={["fit_100x150"]} />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg").namedTransformation(name("fit_100x150"));
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" >
  <cl-transformation transformation={{["fit_100x150"]}}>
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Named("fit_100x150")).BuildImageTag("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setNamed("fit_100x150")).generate("sample.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().named("fit_100x150")).generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg")
   namedTransformation(NamedTransformation.name("fit_100x150")) 
}.generate()
fit_100x150 named transformation applied to image

To create a transformation that applies additional transformations to the jpg_with_quality_30 named transformation, such as fitting it to a 100 pixel width and a 50 pixel height:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg", :transformation=>[
  {:transformation=>["jpg_with_quality_30"]},
  {:height=>50, :width=>100, :crop=>"fit"}
  ])
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'))
  ->namedTransformation(NamedTransformation::name("jpg_with_quality_30"))
  ->resize(Resize::fit()->width(100)
->height(50));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", array("transformation"=>array(
  array("transformation"=>array("jpg_with_quality_30")),
  array("height"=>50, "width"=>100, "crop"=>"fit")
  )))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(transformation=[
  {'transformation': ["jpg_with_quality_30"]},
  {'height': 50, 'width': 100, 'crop': "fit"}
  ])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", {transformation: [
  {transformation: ["jpg_with_quality_30"]},
  {height: 50, width: 100, crop: "fit"}
  ]})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation()
  .named("jpg_with_quality_30").chain()
  .height(50).width(100).crop("fit")).imageTag("sample.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg")
  .namedTransformation(name("jpg_with_quality_30"))
  .resize(fit().width(100).height(50));
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.jpg', {transformation: [
  {transformation: ["jpg_with_quality_30"]},
  {height: 50, width: 100, crop: "fit"}
  ]}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg", {transformation: [
  {transformation: ["jpg_with_quality_30"]},
  {height: 50, width: 100, crop: "fit"}
  ]})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg")
  .namedTransformation(name("jpg_with_quality_30"))
  .resize(fit().width(100).height(50));
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" >
  <Transformation transformation={["jpg_with_quality_30"]} />
  <Transformation height="50" width="100" crop="fit" />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.jpg" >
  <cld-transformation transformation={["jpg_with_quality_30"]} />
  <cld-transformation height="50" width="100" crop="fit" />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg")
  .namedTransformation(name("jpg_with_quality_30"))
  .resize(fit().width(100).height(50));
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" >
  <cl-transformation transformation={{["jpg_with_quality_30"]}}>
  </cl-transformation>
  <cl-transformation height="50" width="100" crop="fit">
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Named("jpg_with_quality_30").Chain()
  .Height(50).Width(100).Crop("fit")).BuildImageTag("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setNamed("jpg_with_quality_30").chain()
  .setHeight(50).setWidth(100).setCrop("fit")).generate("sample.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation()
  .named("jpg_with_quality_30").chain()
  .height(50).width(100).crop("fit")).generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg")
   namedTransformation(NamedTransformation.name("jpg_with_quality_30"))
   resize(Resize.fit() { width(100)
 height(50) }) 
}.generate()
jpg_with_quality_30 named transformation with 100x50 fit applied to image

Chaining named transformations

You can also chain multiple named transformations. For example, to chain the three named transformations we defined above:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg", :transformation=>[
  {:transformation=>["jpg_with_quality_30"]},
  {:transformation=>["crop_400x400"]},
  {:transformation=>["fit_100x150"]}
  ])
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'))
  ->namedTransformation(NamedTransformation::name("jpg_with_quality_30"))
  ->namedTransformation(NamedTransformation::name("crop_400x400"))
  ->namedTransformation(NamedTransformation::name("fit_100x150"));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", array("transformation"=>array(
  array("transformation"=>array("jpg_with_quality_30")),
  array("transformation"=>array("crop_400x400")),
  array("transformation"=>array("fit_100x150"))
  )))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(transformation=[
  {'transformation': ["jpg_with_quality_30"]},
  {'transformation': ["crop_400x400"]},
  {'transformation': ["fit_100x150"]}
  ])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", {transformation: [
  {transformation: ["jpg_with_quality_30"]},
  {transformation: ["crop_400x400"]},
  {transformation: ["fit_100x150"]}
  ]})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation()
  .named("jpg_with_quality_30").chain()
  .named("crop_400x400").chain()
  .named("fit_100x150")).imageTag("sample.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg")
  .namedTransformation(name("jpg_with_quality_30"))
  .namedTransformation(name("crop_400x400"))
  .namedTransformation(name("fit_100x150"));
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.jpg', {transformation: [
  {transformation: ["jpg_with_quality_30"]},
  {transformation: ["crop_400x400"]},
  {transformation: ["fit_100x150"]}
  ]}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg", {transformation: [
  {transformation: ["jpg_with_quality_30"]},
  {transformation: ["crop_400x400"]},
  {transformation: ["fit_100x150"]}
  ]})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg")
  .namedTransformation(name("jpg_with_quality_30"))
  .namedTransformation(name("crop_400x400"))
  .namedTransformation(name("fit_100x150"));
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" >
  <Transformation transformation={["jpg_with_quality_30"]} />
  <Transformation transformation={["crop_400x400"]} />
  <Transformation transformation={["fit_100x150"]} />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.jpg" >
  <cld-transformation transformation={["jpg_with_quality_30"]} />
  <cld-transformation transformation={["crop_400x400"]} />
  <cld-transformation transformation={["fit_100x150"]} />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg")
  .namedTransformation(name("jpg_with_quality_30"))
  .namedTransformation(name("crop_400x400"))
  .namedTransformation(name("fit_100x150"));
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" >
  <cl-transformation transformation={{["jpg_with_quality_30"]}}>
  </cl-transformation>
  <cl-transformation transformation={{["crop_400x400"]}}>
  </cl-transformation>
  <cl-transformation transformation={{["fit_100x150"]}}>
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Named("jpg_with_quality_30").Chain()
  .Named("crop_400x400").Chain()
  .Named("fit_100x150")).BuildImageTag("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setNamed("jpg_with_quality_30").chain()
  .setNamed("crop_400x400").chain()
  .setNamed("fit_100x150")).generate("sample.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation()
  .named("jpg_with_quality_30").chain()
  .named("crop_400x400").chain()
  .named("fit_100x150")).generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg")
   namedTransformation(NamedTransformation.name("jpg_with_quality_30"))
   namedTransformation(NamedTransformation.name("crop_400x400"))
   namedTransformation(NamedTransformation.name("fit_100x150")) 
}.generate()

Chaining transformations can create long URLs, so instead you could define a named transformation that includes a chain of other transformations, including other named transformations. For example, we can create a named transformation that is a composite of the three named transformations described above. It is now simple to specify a single named transformation instead:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg", :transformation=>["demo_combined"])
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'))
  ->namedTransformation(NamedTransformation::name("demo_combined"));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", array("transformation"=>array("demo_combined")))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(transformation=["demo_combined"])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", {transformation: ["demo_combined"]})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation().named("demo_combined")).imageTag("sample.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg").namedTransformation(name("demo_combined"));
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.jpg', {transformation: ["demo_combined"]}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg", {transformation: ["demo_combined"]})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg").namedTransformation(name("demo_combined"));
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" >
  <Transformation transformation={["demo_combined"]} />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.jpg" >
  <cld-transformation transformation={["demo_combined"]} />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg").namedTransformation(name("demo_combined"));
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" >
  <cl-transformation transformation={{["demo_combined"]}}>
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Named("demo_combined")).BuildImageTag("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setNamed("demo_combined")).generate("sample.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().named("demo_combined")).generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg")
   namedTransformation(NamedTransformation.name("demo_combined")) 
}.generate()
demo_combined named transformation applied to image

Where t_demo_combined is defined as: t_jpg_with_quality_30/t_crop_400x400/t_fit_100x150.

Limitations of named transformations

Automatic format

The automatic format transformation parameter (f_auto) is not effective if used in named transformations.

When f_auto is used in a delivery URL, the CDN layer determines the best format to deliver. If this parameter is hidden in a named transformation then it is not visible to the CDN.

You can use f_auto together with a named transformation by chaining the components, for example, t_square/f_auto.

Automatic quality

The automatic quality transformation parameter (q_auto) is effective in named transformations, except in one situation.

When q_auto is used in a delivery URL and the browser sets the Save-Data HTTP header to on in the request, q_auto is translated to q_auto:eco at the CDN level. If this parameter is hidden in a named transformation then it is not visible to the CDN, so the default level is applied, q_auto:good.

To accommodate this situation, you may prefer to use q_auto together with a named transformation by chaining the components, for example, t_square/q_auto.

Note
If you explicitly set the type of quality to apply in a named transformation, for example, q_auto:best, then there are no concerns as there are no dependencies on the CDN level.

Learn more: Save-Data support

Embedding images in web pages using SDKs

You access uploaded images or their derived transformations with URLs. These URLs can be used as the <src> of the <img> tags in your HTML code or other frontend functions to deliver your media assets.

But the easiest way to deliver them is using Cloudinary's framework SDKs to automatically generate transformation URLs and embed them using HTML image tags. The SDKs offer two main helper methods: the URL helper and the image tag helper.

Cloudinary URL helper method

The Cloudinary URL helper method (e.g., cloudinary_url in the Ruby/Rails SDK) automatically generates the image source URL itself. For example, using the URL helper method to return the URL of the sample image, padded to a scaled width and height of 300 pixels with a blue background for the padding:

Ruby (cloudinary 1.x):
Copy to clipboard
cloudinary_url("sample.jpg", :background=>"blue", :height=>300, :width=>300, :crop=>"pad")
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'))
  ->resize(Resize::pad()->width(300)
->height(300)
  ->background(
  Background::color(Color::BLUE))
  );
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
Cloudinary::cloudinary_url("sample.jpg", array("background"=>"blue", "height"=>300, "width"=>300, "crop"=>"pad"))
Python (cloudinary 1.x):
Copy to clipboard
cloudinary.utils.cloudinary_url("sample.jpg", background="blue", height=300, width=300, crop="pad")
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.url("sample.jpg", {background: "blue", height: 300, width: 300, crop: "pad"})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation().background("blue").height(300).width(300).crop("pad")).generate("sample.jpg")
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg").resize(
  pad()
    .width(300)
    .height(300)
    .background(color("blue"))
);
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.url('sample.jpg', {background: "blue", height: 300, width: 300, crop: "pad"});
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.url("sample.jpg", {background: "blue", height: 300, width: 300, crop: "pad"})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg").resize(
  pad()
    .width(300)
    .height(300)
    .background(color("blue"))
);
React (cloudinary-react 1.x):
Copy to clipboard
cloudinary.url('sample.jpg', {background: "blue", height: 300, width: 300, crop: "pad"});
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
cloudinary.url('sample.jpg', {background: "blue", height: 300, width: 300, crop: "pad"});
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg").resize(
  pad()
    .width(300)
    .height(300)
    .background(color("blue"))
);
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
cloudinary.url('sample.jpg', {background: "blue", height: 300, width: 300, crop: "pad"});
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Background("blue").Height(300).Width(300).Crop("pad")).BuildUrl("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
cloudinary.createUrl().setTransformation(CLDTransformation().setBackground("blue").setHeight(300).setWidth(300).setCrop("pad")).generate("sample.jpg")
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().background("blue").height(300).width(300).crop("pad")).generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg")
   resize(Resize.pad() { width(300)
 height(300)
   background(
  Background.color(Color.BLUE))
   }) 
}.generate()

This SDK code outputs the URL:

Cloudinary image tag helper method

By default, the Cloudinary image tag helper method (e.g., cl_image_tag in Ruby on Rails) automatically generates an HTML image tag including the image source URL.

The following shows the same transformations as above, but this time using the image tag to generate a complete HTML image tag.

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg", :height=>100, :width=>300, :crop=>"scale")
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.jpg'))
  ->resize(Resize::scale()->width(300)
->height(100));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", array("height"=>100, "width"=>300, "crop"=>"scale"))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(height=100, width=300, crop="scale")
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", {height: 100, width: 300, crop: "scale"})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation().height(100).width(300).crop("scale")).imageTag("sample.jpg");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.jpg").resize(scale().width(300).height(100));
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.jpg', {height: 100, width: 300, crop: "scale"}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg", {height: 100, width: 300, crop: "scale"})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg").resize(scale().width(300).height(100));
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" >
  <Transformation height="100" width="300" crop="scale" />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.jpg" >
  <cld-transformation height="100" width="300" crop="scale" />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.jpg").resize(scale().width(300).height(100));
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" >
  <cl-transformation height="100" width="300" crop="scale">
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(100).Width(300).Crop("scale")).BuildImageTag("sample.jpg")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(100).setWidth(300).setCrop("scale")).generate("sample.jpg")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().height(100).width(300).crop("scale")).generate("sample.jpg");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.jpg")
   resize(Resize.scale() { width(300)
 height(100) }) 
}.generate()

This SDK code will output the following HTML code:

Copy to clipboard
<img 
  src="https://res.cloudinary.com/demo/image/upload/c_scale,h_100,w_300/sample.jpg"
>

The Cloudinary Image Tag helper method allows you to not only specify any Cloudinary transformations parameters, but also to specify regular HTML image tag attributes (e.g., alt, title, width, height). For example, using the Image Tag helper method to create an HTML image tag for the sample image, with the 'alt' attribute set to "A sample photo" and the 'className' attribute set to "Samples":

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.jpg", :alt=>"A sample photo", :className=>"Samples")
PHP (cloudinary_php 2.x):
Copy to clipboard
ImageTag::fromParams("sample.jpg", ["alt"=>"A sample photo", "className"=>"Samples"])
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", ["alt"=>"A sample photo", "className"=>"Samples"])
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(alt="A sample photo", className="Samples")
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", {alt: "A sample photo", className: "Samples"})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().imageTag("sample.jpg", ObjectUtils.asMap("alt","A sample photo","className","Samples"));
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cl.imageTag('sample.jpg', {alt: "A sample photo", className: "Samples"}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.jpg", {alt: "A sample photo", className: "Samples"})
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.jpg" alt="A sample photo" className="Samples">
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<CLDImage publicId="sample.jpg" alt="A sample photo" className="Samples">
</CLDImage>
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.jpg" alt="A sample photo" className="Samples">
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
@Model.Cloudinary.Api.UrlImgUp.BuildImageTag("sample.jpg", new CloudinaryDotNet.StringDictionary("alt=A sample photo", "className=Samples"));
Go (cloudinary-go 1.x):
Copy to clipboard
Not supported by this SDK

For more information on these SDK helper methods, see the transformation documentation in the relevant SDK guide.

Tip
In general, when using an SDK, you will probably take advantage of the SDK parameter names for improved readability and maintenance of your code. However, you can also optionally pass a raw transformation parameter, whose value is a literal URL transformation definition. Note that the string you pass as the raw transformation value will be appended as is (with no processing or validation) to the end of any other transformation parameters passed in the same component of the transformation chain.

For example:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("flower.jpg", 
  :transformation=>[{:raw_transformation=> "o_90,w_1000,c_fill,g_south_east/l_my_image,fl_relative,w_1.0"}])
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.jpg", 
  ["raw_transformation" => "w_400,c_pad"]);
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.jpg").image(
  transformation=[{"raw_transformation":"w_400,c_pad"}])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.jpg", { transformation: { raw_transformation: "w_400,c_pad" }})
Java (cloudinary 1.x):
Copy to clipboard
<cl:image src="sample.jpg" raw_transformation="w_100,h_150,c_fill"/>

// or
cloudinary.url()
  .transformation(new Transformation().rawTransformation("w_100,h_150,c_fill"))
  .imageTag("sample.jpg");
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cl.imageTag("sample.jpg", { raw_transformation: "w_400,c_pad" }}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.imageTag("sample.jpg", { raw_transformation: "w_400,c_pad" }}).toHtml();
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="mypic">
  <Transformation rawTransformation="h_150,w_150,c_fill,e_sepia,r_20" />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<CLDImage publicId="sample.jpg" rawTransformation="w_150,h_150,c_fill">
</CLDImage>
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image 
  public-id="mypic" 
  class="thumbnail inline" 
  format="jpg"
  raw-transformation="w_150,h_150,c_fill">
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
@Model.Cloudinary.Api.UrlImgUp.Transform(
    new Transformation().RawTransformation("w_100,h_150,c_fill")).BuildImageTag("sample.jpg");
Go (cloudinary-go 1.x):
Copy to clipboard
img, err := cld.Image("sample.jpg")
img.Transformation = "w_400,c_pad"
url, err := img.String()

Image format support

Images can be uploaded to Cloudinary in various formats (input formats), and you can easily convert these images to other formats for displaying in your web site or application (output formats). Examples of situations where you might want to change the delivered image format:

  • Delivering JPEGs for photos that you want to load quickly (or AVIF or WebP if your users are on a browser that supports these or on a mobile app you control).
  • Delivering a PNG (24 bit) for high quality illustrations with a transparent background.
  • Delivering an image where the original format is not supported for delivery by the browser. For example, you could deliver a Photoshop (.psd) image as a JPG.

Tip
For image format optimization guidelines, see How to optimize image format.

Delivering in a different format

You can convert and deliver images in a different format by specifying the required format as the file extension of the delivery URL. When using an SDK to build the URL, you can either append the extension of the new format to the asset's public ID or use the format parameter.

For example, to display a GIF version of the uploaded sample JPEG file:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.gif")
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.gif'));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.gif")
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.gif").image()
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.gif")
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation().imageTag("sample.gif");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.gif");
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.gif').toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.gif")
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.gif");
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.gif" >

</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.gif" >

</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.gif");
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.gif" >

</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.BuildImageTag("sample.gif")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().generate("sample.gif")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().generate("sample.gif");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.gif") 
}.generate()
Image converted to gif

You can combine other image transformations with format conversion. Just make sure the format you use is supported for transformations, as per the Supported image formats table. For example, to deliver a scaled down 150x100 GIF version of the sample image:

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("sample.gif", :height=>100, :width=>150, :crop=>"scale")
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('sample.gif'))
  ->resize(Resize::scale()->width(150)
->height(100));
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("sample.gif", array("height"=>100, "width"=>150, "crop"=>"scale"))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("sample.gif").image(height=100, width=150, crop="scale")
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("sample.gif", {height: 100, width: 150, crop: "scale"})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation().height(100).width(150).crop("scale")).imageTag("sample.gif");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage("sample.gif").resize(scale().width(150).height(100));
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('sample.gif', {height: 100, width: 150, crop: "scale"}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("sample.gif", {height: 100, width: 150, crop: "scale"})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.gif").resize(scale().width(150).height(100));
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="sample.gif" >
  <Transformation height="100" width="150" crop="scale" />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="sample.gif" >
  <cld-transformation height="100" width="150" crop="scale" />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage("sample.gif").resize(scale().width(150).height(100));
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="sample.gif" >
  <cl-transformation height="100" width="150" crop="scale">
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(100).Width(150).Crop("scale")).BuildImageTag("sample.gif")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(100).setWidth(150).setCrop("scale")).generate("sample.gif")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().height(100).width(150).crop("scale")).generate("sample.gif");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("sample.gif")
   resize(Resize.scale() { width(150)
 height(100) }) 
}.generate()
Image scaled down to 150x100 gif

Another option for changing the format is to explicitly call the fetch_format transformation parameter (f in URLs). This can be useful in situations where you cannot change the file extension, for example, when fetching remote images that already have a different file extension (format) as part of their URLs.

For example, to fetch a remote image from Wikimedia in PNG format, and deliver the image in JPG format (also scaled down to a width of 400 pixels):

Ruby (cloudinary 1.x):
Copy to clipboard
cl_image_tag("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png", :type=>"fetch", :transformation=>[
  {:height=>400, :crop=>"scale"},
  {:fetch_format=>"jpg"}
  ])
PHP (cloudinary_php 2.x):
Copy to clipboard
(new ImageTag('https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png'))
  ->resize(Resize::scale()->height(400))
  ->delivery(Delivery::format(
  Format::jpg()))
  ->deliveryType("fetch");
PHP (cloudinary_php 1.x (legacy)):
Copy to clipboard
cl_image_tag("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png", array("type"=>"fetch", "transformation"=>array(
  array("height"=>400, "crop"=>"scale"),
  array("fetch_format"=>"jpg")
  )))
Python (cloudinary 1.x):
Copy to clipboard
CloudinaryImage("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png").image(type="fetch", transformation=[
  {'height': 400, 'crop': "scale"},
  {'fetch_format': "jpg"}
  ])
Node.js (cloudinary 1.x):
Copy to clipboard
cloudinary.image("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png", {type: "fetch", transformation: [
  {height: 400, crop: "scale"},
  {fetch_format: "jpg"}
  ]})
Java (cloudinary 1.x):
Copy to clipboard
cloudinary.url().transformation(new Transformation()
  .height(400).crop("scale").chain()
  .fetchFormat("jpg")).type("fetch").imageTag("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png");
JS (@cloudinary/url-gen 1.x):
Copy to clipboard
new CloudinaryImage(
  "https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png"
)
  .resize(scale().height(400))
  .delivery(format(jpg()))
  .setDeliveryType("fetch");
JS (cloudinary-core 2.x (legacy)):
Copy to clipboard
cloudinary.imageTag('https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png', {type: "fetch", transformation: [
  {height: 400, crop: "scale"},
  {fetchFormat: "jpg"}
  ]}).toHtml();
jQuery (cloudinary-jquery 2.x):
Copy to clipboard
$.cloudinary.image("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png", {type: "fetch", transformation: [
  {height: 400, crop: "scale"},
  {fetch_format: "jpg"}
  ]})
React (@cloudinary/react 1.x):
Copy to clipboard
//React SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage(
  "https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png"
)
  .resize(scale().height(400))
  .delivery(format(jpg()))
  .setDeliveryType("fetch");
React (cloudinary-react 1.x):
Copy to clipboard
<Image publicId="https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png" type="fetch">
  <Transformation height="400" crop="scale" />
  <Transformation fetchFormat="jpg" />
</Image>
Vue.js (cloudinary-vue 1.x):
Copy to clipboard
<cld-image public-id="https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png" type="fetch">
  <cld-transformation height="400" crop="scale" />
  <cld-transformation fetch-format="jpg" />
</cld-image>
Angular (@cloudinary/ng 1.x):
Copy to clipboard
//Angular SDK transformations are created using @cloudinary/url-gen.
new CloudinaryImage(
  "https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png"
)
  .resize(scale().height(400))
  .delivery(format(jpg()))
  .setDeliveryType("fetch");
Angular (@cloudinary/angular-5.x 1.x (legacy)):
Copy to clipboard
<cl-image public-id="https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png" type="fetch">
  <cl-transformation height="400" crop="scale">
  </cl-transformation>
  <cl-transformation fetch-format="jpg">
  </cl-transformation>
</cl-image>
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Height(400).Crop("scale").Chain()
  .FetchFormat("jpg")).Action("fetch").BuildImageTag("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png")
iOS (cloudinary 3.x):
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setType( "fetch").setTransformation(CLDTransformation()
  .setHeight(400).setCrop("scale").chain()
  .setFetchFormat("jpg")).generate("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png")!, cloudinary: cloudinary)
Android (cloudinary-android 1.x):
Copy to clipboard
MediaManager.get().url().transformation(new Transformation()
  .height(400).crop("scale").chain()
  .fetchFormat("jpg")).type("fetch").generate("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png");
Kotlin (kotlin-url-gen 1.x):
Copy to clipboard
cloudinary.image {
  publicId("https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2011.png")
   resize(Resize.scale() { height(400) })
   delivery(Delivery.format(
  Format.jpg()))
   deliveryType("fetch") 
}.generate()
Benedict_Cumberbatch fetched from Wikimedia and delivered as a PNG

Notes

  • If the file extension is omitted in a delivery URL, the file is delivered in the originally uploaded format unless a specific format (or the auto format is requested using the fetch_format (f_) transformation parameter).
  • When converting from one multi-page or multi-layer image format (PDF, GIF, WebP, TIFF, PSD) to another, only the first 100 pages are included in the new file.
  • SDK major versions with initial release later than January 2020 have a format transformation parameter, instead of the fetch_format parameter. See f (format) in the transformation reference.

f_auto

You can take advantage of Cloudinary's automatic format selection (f_auto) transformation to automatically deliver images in the most optimized format that's supported by the requesting browser.

For example, if you deliver a JPG image with f_auto, Cloudinary might generate and deliver the image as a WebP, AVIF or JPEG-2000 file, depending on the requesting browser and your account settings. The f_auto algorithm will similarly deliver the best format when the original asset is a PNG (with or without transparency), an animated GIF, etc.

For details, see Automatic format selection (f_auto) and Tips and considerations for using f_auto.

Supported image formats

The table below summarizes the supported image formats.

Format Extensions Supported for Upload 1 Supported for Transformations 2
AI (Adobe Illustrator) .ai Yes Yes
animated AVIF .avif No Yes 9
animated GIF .gif Yes Yes
animated PNG .png Yes Yes
animated WebP .webp Yes Yes
AVIF .avif Yes Yes 9
BMP .bmp Yes Yes
BW (Browzwear file) .bw Yes Yes 6
DjVu .djvu Yes No
EPS (Encapsulated PostScript) .ps, .ept, .eps, .eps3 Yes Yes
FBX (Filmbox) .fbx 10 Yes Yes 6
FLIF (Free Lossless Image Format) .flif Yes Yes
GIF .gif Yes Yes
GLB (Binary glTF) .glb Yes Yes
glTF (GL Transmission Format) .gltf Yes Yes 6
HEIF .heif, .heic Yes Yes
ICO .ico Yes Yes
InDesign .indd Yes Yes 3
JPEG .jpg, .jpe, .jpeg Yes Yes
JPEG 2000 .jp2 4 Yes Yes
JPEG XR (JPEG eXtended Range) .wdp, .jxr, .hdp Yes Yes
OBJ .obj 10 Yes Yes 6
PDF .pdf Yes Yes
PLY .ply Yes Yes
PNG .png Yes Yes
PSD (PhotoShop Document) .psd Yes Yes 5
Raw image files .arw, .cr2 Yes No
SVG .svg Yes Yes
TARGA (Truevision TGA) .tga Yes Yes
TIFF .tif, .tiff Yes Yes
U3MA (Fabric file) .u3ma Yes Yes 6
USDZ .usdz Yes 7 No 8
WebP .webp Yes Yes

Footnotes

  1. If a format is supported only for upload, then the delivery URL enables a user to download the original file in its original format, but you cannot apply transformation parameters.
  2. If a format is supported for transformations, but the browser doesn't support displaying that format, you can either provide the transformation URL with the original format to enable users to download the file, or you can provide the URL with a different delivery format specified. In that case, Cloudinary applies the transformation to the original format and then converts the image to the requested format for delivery. For example, you could provide a transformation URL for a PhotoShop (.psd) image stored in your account and specify jpg as the delivery format to display the resulting transformation in the browser.
  3. You can transform an InDesign file if you deliver it as an image format, such as jpg or png, but you cannot deliver an indd file with transformations.
  4. By default, when you request a jp2 image with a quality value less than 90, chroma sub-sampling (420) is automatically applied using Kakadu. You can also explicitly request chroma sub-sampling as part of your quality parameter. For example: q_90>:420.
  5. All layers are flattened into a single image if no page parameter is specified.
  6. The 3D format types are uploaded as a zip file. Some transformations, such as converting to a video or image, are supported on the bundle as a whole. No transformations are currently supported on its contained assets. For further information see Transformations on 3D models.
  7. USDZ files can only be uploaded as raw files.
  8. Transformations cannot be applied to USDZ files, but you can deliver any uploaded 3D model as a USDZ file.
  9. Images converted to AVIF and animated AVIF from other formats use additional quota. Images exceeding 9 megapixels cannot be encoded to AVIF - ensure you scale them down first. If enabled, AVIF (but not animated AVIF) may be delivered when automatic format selection (f_auto) is used.
  10. You cannot convert a 3D model of a different format to FBX or OBJ.

Image transformation types

This page walked you through the basics of how image transformations work. The rest of the pages in this guide provide details, use cases and examples of the many different types of transformations you can apply to the images you deliver:

Transformation type Description
Resizing and cropping Resize (crop and/or scale) images server-side before delivering them.
Placing layers on images Place image, text, or other layers on (or under) existing assets to generate new and customized creations on the fly.
Effects and enhancements Apply a huge variety of effects, filters, and other artistic enhancements to any image.
Face-detection based transformations Transform an image based on detected faces.
Animated image transformations Create animated images from multiple images in your account, convert them to video, convert between animated formats, and apply animation-specific transformations.
3D models Learn how to perform transformations on 3D models.
Conditional transformations Apply a transformation only if a specified condition is met.
User-defined variables and arithmetic transformations Use arithmetic expressions and variables to add additional sophistication and flexibility to your transformations.
Custom functions Inject a remote, lamda or WebAssembly function and apply the result as a transformation.

Delivering optimized and responsive media

In addition to changing the appearance of your media assets by transforming them, you can also use Cloudinary URLs and a variety of parameters to control how they are delivered:

Topic Description
Optimizations Deliver your media assets with the smallest possible file size while maintaining visual quality, saving bandwidth and improving performance for your website. This includes automatic quality and format selection optimizations (q_auto and f_auto).
Responsive images Deliver your images to perfectly fit any device, window size, orientation, or resolution at any pixel density (DPR). Upload a single high resolution image and let Cloudinary automatically transform it.
Deliver remote media files
and
Social media profile pictures
Grab media assets from anywhere on the web or pull social media profile pictures from a variety of popular social media networks, including support for on-the-fly transformation and optimized delivery via a CDN.
Paged and layered media Deliver content from assets with multiple pages or layers such as PDFs or Photoshop files, including options for delivering or transforming only selected pages or layers.
Access control Control who can access your media, both the originals and transformed assets, including enabling strict transformations, using signed delivery URLs, uploading images as private or authenticated, and using access_control or access_mode to control who can access an asset without adjusting the URL.
Sprite generation Automatically generate and deliver sprite images with their corresponding CSS based on all images with a specified tag.
Advanced URL delivery options Take advantage of advanced options that make your URLs more SEO-friendly, deliver assets using private CDNs or multi-CDN solutions, use custom domain names (CNames) for your URLs, define custom favicons, work with asset versions, and more.

Related topics
While learning about transformations, you may also want to check out:

✔️ Feedback sent!

Rate this page: