Paged and layered media

With Cloudinary you can deliver media assets that include multiple pages or layers, this includes PDF and Photoshop files.

Delivering content from PDF files

You can upload PDF files to Cloudinary as an image type. You can deliver them via a CDN, convert them to images, and generate thumbnails.

Important note for free accounts:
By default, free Cloudinary accounts are blocked from delivering files in PDF format for security reasons.
For details or to request that this limitation be removed for your free account, see Media delivery.

Deliver a PDF or selected pages of a PDF

To deliver a PDF that is stored in your Cloudinary account, just supply the basic delivery URL:

Ruby:
Copy to clipboard
cl_image_tag("long_multi_page_pdf")
PHP:
Copy to clipboard
cl_image_tag("long_multi_page_pdf")
Python:
Copy to clipboard
CloudinaryImage("long_multi_page_pdf").image()
Node.js:
Copy to clipboard
cloudinary.image("long_multi_page_pdf")
Java:
Copy to clipboard
cloudinary.url().imageTag("long_multi_page_pdf");
JS:
Copy to clipboard
cloudinary.imageTag('long_multi_page_pdf').toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("long_multi_page_pdf")
React:
Copy to clipboard
<Image publicId="long_multi_page_pdf" >

</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="long_multi_page_pdf" >

</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="long_multi_page_pdf" >

</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.BuildImageTag("long_multi_page_pdf")
Android:
Copy to clipboard
MediaManager.get().url().generate("long_multi_page_pdf");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().generate("long_multi_page_pdf")!, cloudinary: cloudinary)

You can also generate a PDF on-the-fly that contains only specified pages or page ranges.

  • Use semi-colons to separate a list of pages: pg_3;5;7
  • Use hyphens to indicate a page range: pg_3-5
  • Use a hyphen with no ending page to indicate starting from a specified page until the end: pg_5-

Tips:

Deliver a selected PDF page as an image

To deliver an image of the first page in a PDF file, just change the file extension from pdf to the image format of your choice in the Cloudinary delivery URL. For example, to deliver a JPEG image of the first page in a previously uploaded PDF file called multi_page_pdf (scaled down to a width of 300 pixels):

Ruby:
Copy to clipboard
cl_image_tag("multi_page_pdf.jpg", :width=>300, :crop=>"scale")
PHP:
Copy to clipboard
cl_image_tag("multi_page_pdf.jpg", array("width"=>300, "crop"=>"scale"))
Python:
Copy to clipboard
CloudinaryImage("multi_page_pdf.jpg").image(width=300, crop="scale")
Node.js:
Copy to clipboard
cloudinary.image("multi_page_pdf.jpg", {width: 300, crop: "scale"})
Java:
Copy to clipboard
cloudinary.url().transformation(new Transformation().width(300).crop("scale")).imageTag("multi_page_pdf.jpg");
JS:
Copy to clipboard
cloudinary.imageTag('multi_page_pdf.jpg', {width: 300, crop: "scale"}).toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("multi_page_pdf.jpg", {width: 300, crop: "scale"})
React:
Copy to clipboard
<Image publicId="multi_page_pdf.jpg" >
  <Transformation width="300" crop="scale" />
</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="multi_page_pdf.jpg" >
  <cld-transformation width="300" crop="scale" />
</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="multi_page_pdf.jpg" >
  <cl-transformation width="300" crop="scale">
  </cl-transformation>
</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Crop("scale")).BuildImageTag("multi_page_pdf.jpg")
Android:
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().width(300).crop("scale")).generate("multi_page_pdf.jpg");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setCrop("scale")).generate("multi_page_pdf.jpg")!, cloudinary: cloudinary)
JPEG image of the first page of a PDF file

To deliver an image of a different page, use the page parameter (pg in URLs):

Ruby:
Copy to clipboard
cl_image_tag("multi_page_pdf.png", :width=>300, :page=>2, :crop=>"scale")
PHP:
Copy to clipboard
cl_image_tag("multi_page_pdf.png", array("width"=>300, "page"=>2, "crop"=>"scale"))
Python:
Copy to clipboard
CloudinaryImage("multi_page_pdf.png").image(width=300, page=2, crop="scale")
Node.js:
Copy to clipboard
cloudinary.image("multi_page_pdf.png", {width: 300, page: 2, crop: "scale"})
Java:
Copy to clipboard
cloudinary.url().transformation(new Transformation().width(300).page(2).crop("scale")).imageTag("multi_page_pdf.png");
JS:
Copy to clipboard
cloudinary.imageTag('multi_page_pdf.png', {width: 300, page: 2, crop: "scale"}).toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("multi_page_pdf.png", {width: 300, page: 2, crop: "scale"})
React:
Copy to clipboard
<Image publicId="multi_page_pdf.png" >
  <Transformation width="300" page="2" crop="scale" />
</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="multi_page_pdf.png" >
  <cld-transformation width="300" page="2" crop="scale" />
</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="multi_page_pdf.png" >
  <cl-transformation width="300" page="2" crop="scale">
  </cl-transformation>
</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Page(2).Crop("scale")).BuildImageTag("multi_page_pdf.png")
Android:
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().width(300).page(2).crop("scale")).generate("multi_page_pdf.png");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setPage(2).setCrop("scale")).generate("multi_page_pdf.png")!, cloudinary: cloudinary)
PNG image of the second page of a PDF file

You can control the resolution of the resulting image by changing the default dpi value of 150 with the density parameter (dn in URLs). For example, to deliver a JPEG image of the PDF file with a density of 20:

Ruby:
Copy to clipboard
cl_image_tag("multi_page_pdf.jpg", :density=>20)
PHP:
Copy to clipboard
cl_image_tag("multi_page_pdf.jpg", array("density"=>20))
Python:
Copy to clipboard
CloudinaryImage("multi_page_pdf.jpg").image(density=20)
Node.js:
Copy to clipboard
cloudinary.image("multi_page_pdf.jpg", {density: 20})
Java:
Copy to clipboard
cloudinary.url().transformation(new Transformation().density(20)).imageTag("multi_page_pdf.jpg");
JS:
Copy to clipboard
cloudinary.imageTag('multi_page_pdf.jpg', {density: 20}).toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("multi_page_pdf.jpg", {density: 20})
React:
Copy to clipboard
<Image publicId="multi_page_pdf.jpg" >
  <Transformation density="20" />
</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="multi_page_pdf.jpg" >
  <cld-transformation density="20" />
</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="multi_page_pdf.jpg" >
  <cl-transformation density="20">
  </cl-transformation>
</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Density(20)).BuildImageTag("multi_page_pdf.jpg")
Android:
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().density(20)).generate("multi_page_pdf.jpg");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setDensity(20)).generate("multi_page_pdf.jpg")!, cloudinary: cloudinary)
JPEG image of the PDF with 20 density

Tip
You can also use the explode method of the Admin API to explicitly generate derived images of all pages of a PDF, including optionally applying any transformation on all the pages before storing them. This method is useful for pre-generating all the pages, so that they do not need to be generated on-the-fly when first accessed by your users.

Creating PDF files from images

You can create a PDF file from images stored in your media library. Identify the images you want to include in the PDF by applying the same tag to each of the images. In the resulting PDF, they are ordered alphabetically by public ID with a page per image.

PDF files can be created from a maximum of 500 images if processed asynchronously (async parameter = true) or a maximum of 100 if synchronously (async = false). If the limit is exceeded, only the first 500 (or 100) images will be included.

To create a PDF file from a set of images that each have the tag "topic", use the multi method, specifying the format as pdf, and optionally add some transformations to each of the images that are added:

Ruby:
Copy to clipboard
Cloudinary::Uploader.multi("topic", :format => "pdf", :transformation => {:width => 800, :crop => "lfill", :gravity => "auto"})
PHP:
Copy to clipboard
\Cloudinary\Uploader::multi("topic", 
  array("format"=>"pdf", "transformation"=>array("width"=>800,"crop"=>"lfill","gravity"=>"auto")
  ));
Python:
Copy to clipboard
cloudinary.uploader.multi("topic", format = "pdf", transformation={"width": 800, "crop": "lfill", "gravity": "auto"})
Node.js:
Copy to clipboard
cloudinary.v2.uploader.multi("topic",
  {format: "pdf", transformation: {width: 800, crop: "lfill", gravity: "auto"}}, 
  function(error,result) {console.log(result, error) });
Java:
Copy to clipboard
cloudinary.uploader().multi("topic", 
  ObjectUtils.asMap(
    "format", "pdf"
    "transformation", new Transformation().width(800).crop("lfill").gravity("auto"));
.Net:
Copy to clipboard
var multiParams = new MultiParams("topic"){Format = "pdf", Transformation = new Transformation().Width(800).Crop("lfill").Gravity("auto")};
var multiResult = cloudinary.Multi(multiParams);
cURL:
Copy to clipboard
curl https://api.cloudinary.com/v1_1/demo/image/multi -X POST --data 'tag=topic&format=pdf&transformation=w_800,c_lfill,g_auto&timestamp=173719931&api_key=436464676&signature=a788d68f86a6f868af'

Learn more about the multi method in the Upload API reference.

Important
By combining multiple images in this way, the resulting PDF may exceed the maximum file size allowed in your plan, in which case you will see the error, "File size too large." Consider using a transformation on each of the images, using the transformation parameter, to reduce the size of the images so as to reduce the size of the resulting PDF file.

Delivering Photoshop images

If you upload a Photoshop (.psd) file and deliver it as a Cloudinary URL, it will enable users to download the original PSD file, including all layers. For example:

Ruby:
Copy to clipboard
cl_image_tag("Cld_Sample_PSD.psd")
PHP:
Copy to clipboard
cl_image_tag("Cld_Sample_PSD.psd")
Python:
Copy to clipboard
CloudinaryImage("Cld_Sample_PSD.psd").image()
Node.js:
Copy to clipboard
cloudinary.image("Cld_Sample_PSD.psd")
Java:
Copy to clipboard
cloudinary.url().imageTag("Cld_Sample_PSD.psd");
JS:
Copy to clipboard
cloudinary.imageTag('Cld_Sample_PSD.psd').toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("Cld_Sample_PSD.psd")
React:
Copy to clipboard
<Image publicId="Cld_Sample_PSD.psd" >

</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="Cld_Sample_PSD.psd" >

</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="Cld_Sample_PSD.psd" >

</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.BuildImageTag("Cld_Sample_PSD.psd")
Android:
Copy to clipboard
MediaManager.get().url().generate("Cld_Sample_PSD.psd");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().generate("Cld_Sample_PSD.psd")!, cloudinary: cloudinary)

You can also apply any standard image transformation, and deliver with another image extension (or explicitly set an image format in the transformation) to deliver it in a format that your website or mobile app can display. For example, below the Cld_Sample_PSD image is delivered as a 300 pixel-width jpg with the grayscale effect:

Ruby:
Copy to clipboard
cl_image_tag("Cld_Sample_PSD.jpg", :width=>300, :effect=>"grayscale", :crop=>"scale")
PHP:
Copy to clipboard
cl_image_tag("Cld_Sample_PSD.jpg", array("width"=>300, "effect"=>"grayscale", "crop"=>"scale"))
Python:
Copy to clipboard
CloudinaryImage("Cld_Sample_PSD.jpg").image(width=300, effect="grayscale", crop="scale")
Node.js:
Copy to clipboard
cloudinary.image("Cld_Sample_PSD.jpg", {width: 300, effect: "grayscale", crop: "scale"})
Java:
Copy to clipboard
cloudinary.url().transformation(new Transformation().width(300).effect("grayscale").crop("scale")).imageTag("Cld_Sample_PSD.jpg");
JS:
Copy to clipboard
cloudinary.imageTag('Cld_Sample_PSD.jpg', {width: 300, effect: "grayscale", crop: "scale"}).toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("Cld_Sample_PSD.jpg", {width: 300, effect: "grayscale", crop: "scale"})
React:
Copy to clipboard
<Image publicId="Cld_Sample_PSD.jpg" >
  <Transformation width="300" effect="grayscale" crop="scale" />
</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="Cld_Sample_PSD.jpg" >
  <cld-transformation width="300" effect="grayscale" crop="scale" />
</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="Cld_Sample_PSD.jpg" >
  <cl-transformation width="300" effect="grayscale" crop="scale">
  </cl-transformation>
</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Effect("grayscale").Crop("scale")).BuildImageTag("Cld_Sample_PSD.jpg")
Android:
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().width(300).effect("grayscale").crop("scale")).generate("Cld_Sample_PSD.jpg");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setEffect("grayscale").setCrop("scale")).generate("Cld_Sample_PSD.jpg")!, cloudinary: cloudinary)
Deliver a Photoshop image as a JPG with manipulations

In addition to these basic options, there are a few special options available for working with PSD files.

Deliver selected layers of a PSD image

You can use the page (pg in URLs) transformation parameter to deliver an image containing only specified layers of a Photoshop image, where pg_1 represents all layers, and pg_2 is the bottom layer. The layers are delivered in the order you specify, even if the specified order is different from the original PSD file.

  • Use semi-colons to separate a list of layers: pg_3;5;7
  • Use hyphens to indicate a range of layers: pg_3-5
  • Use a hyphen with no ending page to indicate starting from a specified layer until the end: pg_5-

For example, below the Cld_Sample_PSD is delivered with all layers except the record cover layer (7), and the cover's shadow layer(5):

Ruby:
Copy to clipboard
cl_image_tag("Cld_Sample_PSD.jpg", :transformation=>[
  {:page=>"2-4;6;8"},
  {:width=>300, :crop=>"scale"}
  ])
PHP:
Copy to clipboard
cl_image_tag("Cld_Sample_PSD.jpg", array("transformation"=>array(
  array("page"=>"2-4;6;8"),
  array("width"=>300, "crop"=>"scale")
  )))
Python:
Copy to clipboard
CloudinaryImage("Cld_Sample_PSD.jpg").image(transformation=[
  {'page': "2-4;6;8"},
  {'width': 300, 'crop': "scale"}
  ])
Node.js:
Copy to clipboard
cloudinary.image("Cld_Sample_PSD.jpg", {transformation: [
  {page: "2-4;6;8"},
  {width: 300, crop: "scale"}
  ]})
Java:
Copy to clipboard
cloudinary.url().transformation(new Transformation()
  .page("2-4;6;8").chain()
  .width(300).crop("scale")).imageTag("Cld_Sample_PSD.jpg");
JS:
Copy to clipboard
cloudinary.imageTag('Cld_Sample_PSD.jpg', {transformation: [
  {page: "2-4;6;8"},
  {width: 300, crop: "scale"}
  ]}).toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("Cld_Sample_PSD.jpg", {transformation: [
  {page: "2-4;6;8"},
  {width: 300, crop: "scale"}
  ]})
React:
Copy to clipboard
<Image publicId="Cld_Sample_PSD.jpg" >
  <Transformation page="2-4;6;8" />
  <Transformation width="300" crop="scale" />
</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="Cld_Sample_PSD.jpg" >
  <cld-transformation page="2-4;6;8" />
  <cld-transformation width="300" crop="scale" />
</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="Cld_Sample_PSD.jpg" >
  <cl-transformation page="2-4;6;8">
  </cl-transformation>
  <cl-transformation width="300" crop="scale">
  </cl-transformation>
</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Page("2-4;6;8").Chain()
  .Width(300).Crop("scale")).BuildImageTag("Cld_Sample_PSD.jpg")
Android:
Copy to clipboard
MediaManager.get().url().transformation(new Transformation()
  .page("2-4;6;8").chain()
  .width(300).crop("scale")).generate("Cld_Sample_PSD.jpg");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setPage("2-4;6;8").chain()
  .setWidth(300).setCrop("scale")).generate("Cld_Sample_PSD.jpg")!, cloudinary: cloudinary)
Delivery Photoshop layers by number

You can also deliver layers by name (case-sensitive) using pg_name:. For example, now we'll deliver only the record cover and it's shadow:

Ruby:
Copy to clipboard
cl_image_tag("Cld_Sample_PSD.jpg", :transformation=>[
  {:page=>"name:record_cover;Shadow"},
  {:width=>300, :crop=>"scale"}
  ])
PHP:
Copy to clipboard
cl_image_tag("Cld_Sample_PSD.jpg", array("transformation"=>array(
  array("page"=>"name:record_cover;Shadow"),
  array("width"=>300, "crop"=>"scale")
  )))
Python:
Copy to clipboard
CloudinaryImage("Cld_Sample_PSD.jpg").image(transformation=[
  {'page': "name:record_cover;Shadow"},
  {'width': 300, 'crop': "scale"}
  ])
Node.js:
Copy to clipboard
cloudinary.image("Cld_Sample_PSD.jpg", {transformation: [
  {page: "name:record_cover;Shadow"},
  {width: 300, crop: "scale"}
  ]})
Java:
Copy to clipboard
cloudinary.url().transformation(new Transformation()
  .page("name:record_cover;Shadow").chain()
  .width(300).crop("scale")).imageTag("Cld_Sample_PSD.jpg");
JS:
Copy to clipboard
cloudinary.imageTag('Cld_Sample_PSD.jpg', {transformation: [
  {page: "name:record_cover;Shadow"},
  {width: 300, crop: "scale"}
  ]}).toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("Cld_Sample_PSD.jpg", {transformation: [
  {page: "name:record_cover;Shadow"},
  {width: 300, crop: "scale"}
  ]})
React:
Copy to clipboard
<Image publicId="Cld_Sample_PSD.jpg" >
  <Transformation page="name:record_cover;Shadow" />
  <Transformation width="300" crop="scale" />
</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="Cld_Sample_PSD.jpg" >
  <cld-transformation page="name:record_cover;Shadow" />
  <cld-transformation width="300" crop="scale" />
</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="Cld_Sample_PSD.jpg" >
  <cl-transformation page="name:record_cover;Shadow">
  </cl-transformation>
  <cl-transformation width="300" crop="scale">
  </cl-transformation>
</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Page("name:record_cover;Shadow").Chain()
  .Width(300).Crop("scale")).BuildImageTag("Cld_Sample_PSD.jpg")
Android:
Copy to clipboard
MediaManager.get().url().transformation(new Transformation()
  .page("name:record_cover;Shadow").chain()
  .width(300).crop("scale")).generate("Cld_Sample_PSD.jpg");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setPage("name:record_cover;Shadow").chain()
  .setWidth(300).setCrop("scale")).generate("Cld_Sample_PSD.jpg")!, cloudinary: cloudinary)
Delivery Photoshop layers by name

Note
If the PSD has more than one layer with the same name, you can refer to them using the name plus an index value. The first instance should be referred just by name, and the next should be referred to as name-1, and so on.

Extract the original content of an embedded object

A Photoshop image may include layers with embedded objects, such as Photoshop smart objects that are scaled down or otherwise modified. As long as the original image’s content is fully preserved in the PSD file, you can extract and deliver the original embedded object using the pg_embedded:[index] parameter, where the [index] is a number that counts only the smart object layers in the PSD file, or you can use the pg_embedded:name:[filename] parameter to specify the original filename (including the extension) of the embedded smart object.

For example, suppose we embed a high resolution city scene as a smart object layer in our sample PSD. You can use the pg_embedded option to extract the full resolution city image called skyline-3242040_1920. There are also 2 other embedded objects in this PSD, so alternatively, we could have referenced it as the 3rd embedded object (pg_embedded:3):

Ruby:
Copy to clipboard
cl_image_tag("cld_sample_smart_PSD.jpg", :page=>"embedded:name:skyline-3242040_1920.jpg")
PHP:
Copy to clipboard
cl_image_tag("cld_sample_smart_PSD.jpg", array("page"=>"embedded:name:skyline-3242040_1920.jpg"))
Python:
Copy to clipboard
CloudinaryImage("cld_sample_smart_PSD.jpg").image(page="embedded:name:skyline-3242040_1920.jpg")
Node.js:
Copy to clipboard
cloudinary.image("cld_sample_smart_PSD.jpg", {page: "embedded:name:skyline-3242040_1920.jpg"})
Java:
Copy to clipboard
cloudinary.url().transformation(new Transformation().page("embedded:name:skyline-3242040_1920.jpg")).imageTag("cld_sample_smart_PSD.jpg");
JS:
Copy to clipboard
cloudinary.imageTag('cld_sample_smart_PSD.jpg', {page: "embedded:name:skyline-3242040_1920.jpg"}).toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("cld_sample_smart_PSD.jpg", {page: "embedded:name:skyline-3242040_1920.jpg"})
React:
Copy to clipboard
<Image publicId="cld_sample_smart_PSD.jpg" >
  <Transformation page="embedded:name:skyline-3242040_1920.jpg" />
</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="cld_sample_smart_PSD.jpg" >
  <cld-transformation page="embedded:name:skyline-3242040_1920.jpg" />
</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="cld_sample_smart_PSD.jpg" >
  <cl-transformation page="embedded:name:skyline-3242040_1920.jpg">
  </cl-transformation>
</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Page("embedded:name:skyline-3242040_1920.jpg")).BuildImageTag("cld_sample_smart_PSD.jpg")
Android:
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().page("embedded:name:skyline-3242040_1920.jpg")).generate("cld_sample_smart_PSD.jpg");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setPage("embedded:name:skyline-3242040_1920.jpg")).generate("cld_sample_smart_PSD.jpg")!, cloudinary: cloudinary)

Full PSD as a jpg Full PSD as a jpg.
Click to view full size.
Extract full resolution of embedded object from PSD
Extracted original object.
Click to view full size.

Additional Photoshop image manipulation options

When working with Photoshop images, you may also want to take advantage of the following:

  • You can trim the pixels of a PSD image according to a Photoshop clipping path that is stored in the image's metadata, using the fl_clip transformation flag.

    • If there are multiple paths stored in the PSD, you can specify which path to use by path number or name using the page parameter (pg in URLs).
    • For example, /fl_clip,pg_2/my_image.jpg will deliver your Photoshop image as a .jpg file, trimmed to the second clipping path in the file.
      Alternatively, fl_clip,pg_name:mypath will trim to the clipping path named mypath in your PSD file.
  • You can force all semi-transparent pixels in an image to be either fully transparent or fully opaque using the e_opacity_threshold transformation effect. This can be a useful solution when PhotoShop PSD files are delivered in a format that supports partial transparency, such as PNG, and the default results are not as expected. For details, see the opacity_threshold effect parameter in the Image Transformation Reference.