Resize an image

Resize your images by setting the width and/or height parameters (w and h in URLs). When resizing using Cloudinary's URL-based transformations, Cloudinary will automatically apply the scale crop mode. Alternatively, you can use any one of our many supported crop modes.

Original

Original

Scaled

Scaled

Stretched

Stretched
Ruby:
Copy to clipboard
cl_image_tag("turtles.jpg", :width=>70, :height=>53, :crop=>"scale")
PHP:
Copy to clipboard
cl_image_tag("turtles.jpg", array("width"=>70, "height"=>53, "crop"=>"scale"))
Python:
Copy to clipboard
CloudinaryImage("turtles.jpg").image(width=70, height=53, crop="scale")
Node.js:
Copy to clipboard
cloudinary.image("turtles.jpg", {width: 70, height: 53, crop: "scale"})
Java:
Copy to clipboard
cloudinary.url().transformation(new Transformation().width(70).height(53).crop("scale")).imageTag("turtles.jpg");
JS:
Copy to clipboard
cloudinary.imageTag('turtles.jpg', {width: 70, height: 53, crop: "scale"}).toHtml();
jQuery:
Copy to clipboard
$.cloudinary.image("turtles.jpg", {width: 70, height: 53, crop: "scale"})
React:
Copy to clipboard
<Image publicId="turtles.jpg" >
  <Transformation width="70" height="53" crop="scale" />
</Image>
Vue.js:
Copy to clipboard
<cld-image publicId="turtles.jpg" >
  <cld-transformation width="70" height="53" crop="scale" />
</cld-image>
Angular:
Copy to clipboard
<cl-image public-id="turtles.jpg" >
  <cl-transformation width="70" height="53" crop="scale">
  </cl-transformation>
</cl-image>
.Net:
Copy to clipboard
cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(70).Height(53).Crop("scale")).BuildImageTag("turtles.jpg")
Android:
Copy to clipboard
MediaManager.get().url().transformation(new Transformation().width(70).height(53).crop("scale")).generate("turtles.jpg");
iOS:
Copy to clipboard
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(70).setHeight(53).setCrop("scale")).generate("turtles.jpg")!, cloudinary: cloudinary)
by Itay Taragano