{"id":27350,"date":"2023-03-29T08:29:22","date_gmt":"2023-03-29T15:29:22","guid":{"rendered":"https:\/\/cloudinary.com\/blog\/?p=27350"},"modified":"2025-11-06T15:57:38","modified_gmt":"2025-11-06T23:57:38","slug":"remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react","title":{"rendered":"Remove Image Backgrounds and Add Realistic Shadows to Products in React"},"content":{"rendered":"\n<p>When displaying a set of product images, uniformity is key. Customers should be focusing on the product, not distracted by the background, especially if there are different backgrounds in each image. Therefore it makes sense to conduct product image background removal for any images that you want to group together. But have you ever noticed how products without backgrounds look like they\u2019re floating in mid-air? Applying a realistic-looking product image shadow can \u2018ground\u2019 those floating objects and return a sense of depth to your images.<\/p>\n\n\n\n<p>In this post you\u2019ll learn how to leverage an image background React JS project to display product sets in a React application, first displaying the original images, resized and optimized for web delivery, then with their backgrounds removed, and finally with drop shadow applied.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Should I Remove Image Backgrounds?<\/h2>\n\n\n\n<p>There are plenty of advantages that would lead you to remove image backgrounds from your product images. First off, it can improve the appearance of an image by making the subject stand out from it\u2019s surroundings. Secondly, it can make images more versatile by allowing them to be used in different contexts. Finally, it can also help by just reducing the file size of an image.<\/p>\n\n\n\n<p>However, there are also some downsides that make give you pause before you go ahead and remove image backgrounds from your product images. Product image background removal can be a complex task, especially if it\u2019s a complex image or detailed background. Image quality can also be reduced, if the background isn\u2019t removed smoothly. Additionally, it can also be time-consuming if you need to do it at scale.<\/p>\n\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>The Background to Background Removal<\/h2>\n<p>For several years, Cloudinary has offered an <a href=\"https:\/\/cloudinary.com\/documentation\/cloudinary_ai_background_removal_addon\">AI background removal add-on<\/a>.  Until recently, the only way to use it would have been to trigger it while uploading or updating an image, and only the background-removed version of the image would have been stored. Now, you can store the original image and remove the background on delivery, keeping the original intact.  You still need to <a href=\"https:\/\/cloudinary.com\/addons#cloudinary_ai\">register for the add-on<\/a>, but now you can simply use the <code>background_removal<\/code> effect transformation parameter (<code>e_background_removal<\/code> in the delivery URL), like this:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;docs\\\/cars\\\/car5\\&quot;, {effect: \\&quot;background_removal\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;docs\\\/cars\\\/car5\\&quot;, {effect: \\&quot;background_removal\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt; &lt;Transformation effect=\\&quot;background_removal\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt;\\n\\t&lt;Transformation effect=\\&quot;background_removal\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt; &lt;cld-transformation effect=\\&quot;background_removal\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt;\\n\\t&lt;cld-transformation effect=\\&quot;background_removal\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt; &lt;cl-transformation effect=\\&quot;background_removal\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt;\\n\\t&lt;cl-transformation effect=\\&quot;background_removal\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;docs\\\/cars\\\/car5&#039;, {effect: \\&quot;background_removal\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;docs\\\/cars\\\/car5&#039;, {effect: \\&quot;background_removal\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).image(effect=\\&quot;background_removal\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).image(effect=\\&quot;background_removal\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;docs\\\/cars\\\/car5&#039;))\\n\\t-&gt;effect(Effect::backgroundRemoval());&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;docs\\\/cars\\\/car5&#039;))\\n\\t-&gt;effect(Effect::backgroundRemoval());&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/cars\\\/car5\\&quot;, array(\\&quot;effect\\&quot;=&gt;\\&quot;background_removal\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/cars\\\/car5\\&quot;, array(\\&quot;effect\\&quot;=&gt;\\&quot;background_removal\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().effect(\\&quot;background_removal\\&quot;)).imageTag(\\&quot;docs\\\/cars\\\/car5\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().effect(\\&quot;background_removal\\&quot;)).imageTag(\\&quot;docs\\\/cars\\\/car5\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/cars\\\/car5\\&quot;, effect: \\&quot;background_removal\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/cars\\\/car5\\&quot;, effect: \\&quot;background_removal\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Effect(\\&quot;background_removal\\&quot;)).BuildImageTag(\\&quot;docs\\\/cars\\\/car5\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Effect(\\&quot;background_removal\\&quot;)).BuildImageTag(\\&quot;docs\\\/cars\\\/car5\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/cars\\\/car5&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval()));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/cars\\\/car5&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setEffect(\\&quot;background_removal\\&quot;)).generate(\\&quot;docs\\\/cars\\\/car5\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setEffect(\\&quot;background_removal\\&quot;)).generate(\\&quot;docs\\\/cars\\\/car5\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().effect(\\&quot;background_removal\\&quot;)).generate(\\&quot;docs\\\/cars\\\/car5\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().effect(\\&quot;background_removal\\&quot;)).generate(\\&quot;docs\\\/cars\\\/car5\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/cars\\\/car5&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval()));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/cars\\\/car5&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n\\t effect(Effect.backgroundRemoval()) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n\\t effect(Effect.backgroundRemoval()) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;docs\\\/cars\\\/car5\\&quot;, {effect: \\&quot;background_removal\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;docs\\\/cars\\\/car5\\&quot;, {effect: \\&quot;background_removal\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).effect(backgroundRemoval());&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/e_background_removal\\\/docs\\\/cars\\\/car5&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;effect&quot;:&quot;background_removal&quot;}],&quot;transformation_string&quot;:&quot;e_background_removal&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:null,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;docs\\\/cars\\\/car5&quot;,&quot;extension&quot;:&quot;&quot;,&quot;format&quot;:&quot;&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><\/p>\n<div style=\"clear: both; margin-bottom: 20px\">\n<\/div>\n<div style=\"text-align:center;\">\n<span style=\"display:inline-block;vertical-align:top;\">\n<a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/docs\/cars\/car5\" target =\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,w_300\/docs\/cars\/car5\" alt=\"Image showing a Mercedes original photo for the product image background removal and add product image shadow project with React and Cloudinary\" title=\"Original image of car with background\" style=\"margin-right: 30px;display:block;\" \/><\/a>\n<b style=\"margin-right: 30px;display:block;\">Original<\/b>\n<\/span>\n<span style=\"display:inline-block;vertical-align:top;\">\n<a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/docs\/cars\/car5\" target =\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/c_scale,w_300\/docs\/cars\/car5\" alt=\"Image showing a Mercedes with the background removed from the original photo for the product image background removal and add product image shadow project with React and Cloudinary\" title=\"Car with background removed\" style=\"margin-right: 30px;display:block;\" \/><\/a>\n<b style=\"margin-right: 30px;display:block;\">Background removed<\/b>\n<\/span>\n<\/div>\n<div style=\"clear: both; margin-bottom: 20px\">\n<\/div>\n<p>Another recent update to the <a href=\"https:\/\/cloudinary.com\/background-remover\">background removal<\/a> functionality is to recognise cars and remove background content displayed through car windows. A special effect is also added to the windows to simulate real windows.  This is all done automatically, using the same <code>e_background_removal<\/code> parameter.<\/p>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Product Image Shadow | Shedding Light on Drop Shadow<\/h2>\n<p>Drop shadow is applied to objects in background-removed images by setting up a virtual light source using the <code>dropshadow<\/code> effect (<code>e_dropshadow<\/code> in URLs):<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;docs\\\/cars\\\/car5\\&quot;, {transformation: [ {effect: \\&quot;background_removal\\&quot;}, {effect: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;}, {height: 488, width: 960, crop: \\&quot;scale\\&quot;}, {quality: \\&quot;auto\\&quot;} ]})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;docs\\\/cars\\\/car5\\&quot;, {transformation: [\\n  {effect: \\&quot;background_removal\\&quot;},\\n  {effect: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;},\\n  {height: 488, width: 960, crop: \\&quot;scale\\&quot;},\\n  {quality: \\&quot;auto\\&quot;}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt; &lt;Transformation effect=\\&quot;background_removal\\&quot; \\\/&gt; &lt;Transformation effect=\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot; \\\/&gt; &lt;Transformation height=\\&quot;488\\&quot; width=\\&quot;960\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt; &lt;Transformation quality=\\&quot;auto\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt;\\n\\t&lt;Transformation effect=\\&quot;background_removal\\&quot; \\\/&gt;\\n\\t&lt;Transformation effect=\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot; \\\/&gt;\\n\\t&lt;Transformation height=\\&quot;488\\&quot; width=\\&quot;960\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt;\\n\\t&lt;Transformation quality=\\&quot;auto\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt; &lt;cld-transformation effect=\\&quot;background_removal\\&quot; \\\/&gt; &lt;cld-transformation effect=\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot; \\\/&gt; &lt;cld-transformation height=\\&quot;488\\&quot; width=\\&quot;960\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt; &lt;cld-transformation quality=\\&quot;auto\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt;\\n\\t&lt;cld-transformation effect=\\&quot;background_removal\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation effect=\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation height=\\&quot;488\\&quot; width=\\&quot;960\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation quality=\\&quot;auto\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt; &lt;cl-transformation effect=\\&quot;background_removal\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation effect=\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation height=\\&quot;488\\&quot; width=\\&quot;960\\&quot; crop=\\&quot;scale\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation quality=\\&quot;auto\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;docs\\\/cars\\\/car5\\&quot; &gt;\\n\\t&lt;cl-transformation effect=\\&quot;background_removal\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation effect=\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation height=\\&quot;488\\&quot; width=\\&quot;960\\&quot; crop=\\&quot;scale\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation quality=\\&quot;auto\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;docs\\\/cars\\\/car5&#039;, {transformation: [ {effect: \\&quot;background_removal\\&quot;}, {effect: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;}, {height: 488, width: 960, crop: \\&quot;scale\\&quot;}, {quality: \\&quot;auto\\&quot;} ]}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;docs\\\/cars\\\/car5&#039;, {transformation: [\\n  {effect: \\&quot;background_removal\\&quot;},\\n  {effect: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;},\\n  {height: 488, width: 960, crop: \\&quot;scale\\&quot;},\\n  {quality: \\&quot;auto\\&quot;}\\n  ]}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).image(transformation=[ {&#039;effect&#039;: \\&quot;background_removal\\&quot;}, {&#039;effect&#039;: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;}, {&#039;height&#039;: 488, &#039;width&#039;: 960, &#039;crop&#039;: \\&quot;scale\\&quot;}, {&#039;quality&#039;: \\&quot;auto\\&quot;} ])&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;).image(transformation=[\\n  {&#039;effect&#039;: \\&quot;background_removal\\&quot;},\\n  {&#039;effect&#039;: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;},\\n  {&#039;height&#039;: 488, &#039;width&#039;: 960, &#039;crop&#039;: \\&quot;scale\\&quot;},\\n  {&#039;quality&#039;: \\&quot;auto\\&quot;}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;docs\\\/cars\\\/car5&#039;))\\n\\t-&gt;effect(Effect::backgroundRemoval())\\n\\t-&gt;effect(Effect::dropShadow()-&gt;azimuth(45)\\n-&gt;elevation(69)\\n-&gt;spread(50))\\n\\t-&gt;resize(Resize::scale()-&gt;width(960)\\n-&gt;height(488))\\n\\t-&gt;delivery(Delivery::format(\\n\\tFormat::auto()))\\n\\t-&gt;delivery(Delivery::quality(\\n\\tQuality::auto()));&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;docs\\\/cars\\\/car5&#039;))\\n\\t-&gt;effect(Effect::backgroundRemoval())\\n\\t-&gt;effect(Effect::dropShadow()-&gt;azimuth(45)\\n-&gt;elevation(69)\\n-&gt;spread(50))\\n\\t-&gt;resize(Resize::scale()-&gt;width(960)\\n-&gt;height(488))\\n\\t-&gt;delivery(Delivery::format(\\n\\tFormat::auto()))\\n\\t-&gt;delivery(Delivery::quality(\\n\\tQuality::auto()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/cars\\\/car5\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array( array(\\&quot;effect\\&quot;=&gt;\\&quot;background_removal\\&quot;), array(\\&quot;effect\\&quot;=&gt;\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;), array(\\&quot;height\\&quot;=&gt;488, \\&quot;width\\&quot;=&gt;960, \\&quot;crop\\&quot;=&gt;\\&quot;scale\\&quot;), array(\\&quot;quality\\&quot;=&gt;\\&quot;auto\\&quot;) )))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/cars\\\/car5\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array(\\n  array(\\&quot;effect\\&quot;=&gt;\\&quot;background_removal\\&quot;),\\n  array(\\&quot;effect\\&quot;=&gt;\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;),\\n  array(\\&quot;height\\&quot;=&gt;488, \\&quot;width\\&quot;=&gt;960, \\&quot;crop\\&quot;=&gt;\\&quot;scale\\&quot;),\\n  array(\\&quot;quality\\&quot;=&gt;\\&quot;auto\\&quot;)\\n  )))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().effect(\\&quot;background_removal\\&quot;).chain() .effect(\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;).chain() .height(488).width(960).crop(\\&quot;scale\\&quot;).chain() .quality(\\&quot;auto\\&quot;)).imageTag(\\&quot;docs\\\/cars\\\/car5\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation()\\n  .effect(\\&quot;background_removal\\&quot;).chain()\\n  .effect(\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;).chain()\\n  .height(488).width(960).crop(\\&quot;scale\\&quot;).chain()\\n  .quality(\\&quot;auto\\&quot;)).imageTag(\\&quot;docs\\\/cars\\\/car5\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/cars\\\/car5\\&quot;, transformation: [ {effect: \\&quot;background_removal\\&quot;}, {effect: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;}, {height: 488, width: 960, crop: \\&quot;scale\\&quot;}, {quality: \\&quot;auto\\&quot;} ])&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/cars\\\/car5\\&quot;, transformation: [\\n  {effect: \\&quot;background_removal\\&quot;},\\n  {effect: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;},\\n  {height: 488, width: 960, crop: \\&quot;scale\\&quot;},\\n  {quality: \\&quot;auto\\&quot;}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Effect(\\&quot;background_removal\\&quot;).Chain() .Effect(\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;).Chain() .Height(488).Width(960).Crop(\\&quot;scale\\&quot;).Chain() .Quality(\\&quot;auto\\&quot;)).BuildImageTag(\\&quot;docs\\\/cars\\\/car5\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation()\\n  .Effect(\\&quot;background_removal\\&quot;).Chain()\\n  .Effect(\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;).Chain()\\n  .Height(488).Width(960).Crop(\\&quot;scale\\&quot;).Chain()\\n  .Quality(\\&quot;auto\\&quot;)).BuildImageTag(\\&quot;docs\\\/cars\\\/car5\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/cars\\\/car5&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval())\\n\\t.effect(Effect.dropShadow().azimuth(45)\\n.elevation(69)\\n.spread(50))\\n\\t.resize(Resize.scale().width(960)\\n.height(488))\\n\\t.delivery(Delivery.format(\\n\\tFormat.auto()))\\n\\t.delivery(Delivery.quality(\\n\\tQuality.auto())));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/cars\\\/car5&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval())\\n\\t.effect(Effect.dropShadow().azimuth(45)\\n.elevation(69)\\n.spread(50))\\n\\t.resize(Resize.scale().width(960)\\n.height(488))\\n\\t.delivery(Delivery.format(\\n\\tFormat.auto()))\\n\\t.delivery(Delivery.quality(\\n\\tQuality.auto())));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setEffect(\\&quot;background_removal\\&quot;).chain() .setEffect(\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;).chain() .setHeight(488).setWidth(960).setCrop(\\&quot;scale\\&quot;).chain() .setQuality(\\&quot;auto\\&quot;)).generate(\\&quot;docs\\\/cars\\\/car5\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()\\n  .setEffect(\\&quot;background_removal\\&quot;).chain()\\n  .setEffect(\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;).chain()\\n  .setHeight(488).setWidth(960).setCrop(\\&quot;scale\\&quot;).chain()\\n  .setQuality(\\&quot;auto\\&quot;)).generate(\\&quot;docs\\\/cars\\\/car5\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().effect(\\&quot;background_removal\\&quot;).chain() .effect(\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;).chain() .height(488).width(960).crop(\\&quot;scale\\&quot;).chain() .quality(\\&quot;auto\\&quot;)).generate(\\&quot;docs\\\/cars\\\/car5\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation()\\n  .effect(\\&quot;background_removal\\&quot;).chain()\\n  .effect(\\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;).chain()\\n  .height(488).width(960).crop(\\&quot;scale\\&quot;).chain()\\n  .quality(\\&quot;auto\\&quot;)).generate(\\&quot;docs\\\/cars\\\/car5\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/cars\\\/car5&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval())\\n\\t.effect(Effect.dropShadow().azimuth(45)\\n.elevation(69)\\n.spread(50))\\n\\t.resize(Resize.scale().width(960)\\n.height(488))\\n\\t.delivery(Delivery.format(\\n\\tFormat.auto()))\\n\\t.delivery(Delivery.quality(\\n\\tQuality.auto())));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/cars\\\/car5&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval())\\n\\t.effect(Effect.dropShadow().azimuth(45)\\n.elevation(69)\\n.spread(50))\\n\\t.resize(Resize.scale().width(960)\\n.height(488))\\n\\t.delivery(Delivery.format(\\n\\tFormat.auto()))\\n\\t.delivery(Delivery.quality(\\n\\tQuality.auto())));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n\\t effect(Effect.backgroundRemoval())\\n\\t effect(Effect.dropShadow() { azimuth(45)\\n elevation(69)\\n spread(50) })\\n\\t resize(Resize.scale() { width(960)\\n height(488) })\\n\\t delivery(Delivery.format(\\n\\tFormat.auto()))\\n\\t delivery(Delivery.quality(\\n\\tQuality.auto())) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n\\t effect(Effect.backgroundRemoval())\\n\\t effect(Effect.dropShadow() { azimuth(45)\\n elevation(69)\\n spread(50) })\\n\\t resize(Resize.scale() { width(960)\\n height(488) })\\n\\t delivery(Delivery.format(\\n\\tFormat.auto()))\\n\\t delivery(Delivery.quality(\\n\\tQuality.auto())) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;docs\\\/cars\\\/car5\\&quot;, {transformation: [ {effect: \\&quot;background_removal\\&quot;}, {effect: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;}, {height: 488, width: 960, crop: \\&quot;scale\\&quot;}, {quality: \\&quot;auto\\&quot;} ]})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;docs\\\/cars\\\/car5\\&quot;, {transformation: [\\n  {effect: \\&quot;background_removal\\&quot;},\\n  {effect: \\&quot;dropshadow:azimuth_45;elevation_69;spread_50\\&quot;},\\n  {height: 488, width: 960, crop: \\&quot;scale\\&quot;},\\n  {quality: \\&quot;auto\\&quot;}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/cars\\\/car5\\&quot;)\\n  .effect(backgroundRemoval())\\n  .effect(dropShadow().azimuth(45).elevation(69).spread(50))\\n  .resize(scale().width(960).height(488))\\n  .delivery(format(auto()))\\n  .delivery(quality(auto()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/e_background_removal\\\/e_dropshadow:azimuth_45;elevation_69;spread_50\\\/c_scale,h_488,w_960\\\/f_auto\\\/q_auto\\\/docs\\\/cars\\\/car5&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;effect&quot;:&quot;background_removal&quot;},{&quot;effect&quot;:&quot;dropshadow:azimuth_45;elevation_69;spread_50&quot;},{&quot;crop_mode&quot;:&quot;scale&quot;,&quot;height&quot;:&quot;488&quot;,&quot;width&quot;:&quot;960&quot;},{&quot;format&quot;:&quot;auto&quot;},{&quot;quality&quot;:&quot;auto&quot;}],&quot;transformation_string&quot;:&quot;e_background_removal\\\/e_dropshadow:azimuth_45;elevation_69;spread_50\\\/c_scale,h_488,w_960\\\/f_auto\\\/q_auto&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:null,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;docs\\\/cars\\\/car5&quot;,&quot;extension&quot;:&quot;&quot;,&quot;format&quot;:&quot;auto&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/e_dropshadow:azimuth_45;elevation_69;spread_50\/c_scale,h_488,w_960\/f_auto\/q_auto\/docs\/cars\/car5\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/e_dropshadow:azimuth_45;elevation_69;spread_50\/c_scale,h_488,w_960\/f_auto\/q_auto\/w_500\/docs\/cars\/car5\" alt=\"Image showing a Mercedes photo with the background removed and a shadow added for the product image background removal and add product image shadow project with React and Cloudinary\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"500\" height=\"254\"\/><\/a><\/p>\n<p>You can set the azimuth, elevation and spread of the virtual light source (see the <a href=\"https:\/\/cloudinary.com\/documentation\/transformation_reference#e_dropshadow\">full syntax<\/a>). Use the following model to help you understand the angles involved:<\/p>\n<p><a class=\"c-image-link\" href=\"https:\/\/cloudinary-res.cloudinary.com\/image\/upload\/f_auto\/q_auto\/docs\/light_angles.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/cloudinary-res.cloudinary.com\/image\/upload\/f_auto\/q_auto\/w_350,dpr_2.0\/docs\/light_angles.png\" alt=\"Image showing a compass demonstrating azimuth and elevation for the product image background removal and add product image shadow project with React and Cloudinary\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"350\" height=\"225.5\"\/><\/a><\/p>\n<p>North (0\u00b0\/360\u00b0) is behind the object, so the shadow falls directly in front of the object. Elevation ranges from ground level (0\u00b0) to above the object (90\u00b0), so the smaller the number, the longer the shadow.<\/p>\n<p>Spread ranges from 0% to 100%, where the smaller the number, the closer the light source is to \u2018point\u2019 light, and larger numbers mean \u2018area\u2019 light.<\/p>\n<p>Have a play with the parameters in this <a href=\"https:\/\/cloudinary.com\/documentation\/effects_and_artistic_enhancements#dropshadow_effect_demo\">interactive demo<\/a>.<\/p>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Image Background React JS | Overview of the React App<\/h2>\n<p>The following React App demonstrates how to use the Cloudinary React SDK to remove backgrounds and apply drop shadow.<\/p>\n<p>Before getting into the details, let\u2019s start by trying it out. Go ahead and have a play.<\/p>\n<iframe src=\"https:\/\/codesandbox.io\/embed\/github\/cloudinary-devs\/react-dropshadow\/tree\/main\/?fontsize=14&#038;hidenavigation=1&#038;theme=dark\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"react-dropshadow\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ><\/iframe>\n<p>This code is also available in <a href=\"https:\/\/github.com\/cloudinary-devs\/react-dropshadow\">GitHub<\/a>.<\/p>\n<div class='c-callout  c-callout--inline-title c-callout--note'><strong class='c-callout__title'>Note:<\/strong> <p>If you want to try creating something similar you need to <a href=\"https:\/\/cloudinary.com\/users\/register_free\">sign up for a free Cloudinary account<\/a>, and <a href=\"https:\/\/cloudinary.com\/addons#cloudinary_ai\">register for the Cloudinary AI background removal add-on<\/a>, which also has a free tier.<\/p><\/div>\n<p>There are three different product sets to choose from and you can choose to display the originals or the background removed images, with or without drop shadow.<\/p>\n<p>If you select <strong>Drop Shadow<\/strong>, you\u2019ll see some additional options to set the light source that creates the shadow:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-res.cloudinary.com\/image\/upload\/f_auto\/q_auto\/w_500,dpr_2.0\/docs\/blog\/light-source-options.png\" alt=\"Image showing a screenshot of the controls for handling product image shadow with Cloudinary\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"500\" height=\"285\"\/><\/p>\n<p>This virtual light source is uniformly applied to the product image shadow of all the images in the product set, casting shadows in the same direction for each object.<\/p>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Displaying the Images<\/h2>\n<p>For this React app I decided to use <a href=\"https:\/\/react-photo-album.com\">React Photo Album<\/a> as an easy way to display the images and also to show how to use Cloudinary delivery URLs together with other React libraries. At its most basic level, the <code>PhotoAlbum<\/code> component takes an array of images, together with their widths and heights. This is an example from their docs:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> PhotoAlbum <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react-photo-album\"<\/span>;\n\n<span class=\"hljs-keyword\">const<\/span> photos = &#91;\n    { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/images\/image1.jpg\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">800<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">600<\/span> },\n    { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/images\/image2.jpg\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">1600<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">900<\/span> },\n];\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">Gallery<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">PhotoAlbum<\/span> <span class=\"hljs-attr\">layout<\/span>=<span class=\"hljs-string\">\"rows\"<\/span> <span class=\"hljs-attr\">photos<\/span>=<span class=\"hljs-string\">{photos}<\/span> \/&gt;<\/span><\/span>;\n}\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The <code>src<\/code> of each of the photos can be set to a URL, and that\u2019s where Cloudinary comes in.  All the product images in the app are stored in the <code>demo<\/code> Cloudinary product environment, so they can be accessed with delivery URLs that look similar to this:<\/p>\n<pre class=\"js-syntax-highlighted\"><code>https:\/\/res.cloudinary.com\/demo\/image\/upload\/docs\/image1\n<\/code><\/pre>\n<p>Having played with the app, you\u2019ll see that there are five images for each product set, and three \u2018flavors\u2019 of each set (original, background removed, and background removed with shadow), so you might assume that you\u2019d need fifteen different images for each product set.  But no &#8211; with Cloudinary, you only need to store the original five images, and let Cloudinary create the others on the fly.<\/p>\n<p>Moreover, React Photo Album supports responsive images when you provide smaller images in the the photo <code>images<\/code> attribute:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> PhotoAlbum <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react-photo-album\"<\/span>;\n\n<span class=\"hljs-keyword\">const<\/span> photos = &#91;\n    {\n        <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/images\/image1_800x600.jpg\"<\/span>,\n        <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">800<\/span>,\n        <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">600<\/span>,\n        <span class=\"hljs-attr\">images<\/span>: &#91;\n            { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/images\/image1_400x300.jpg\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">400<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">300<\/span> },\n            { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/images\/image1_200x150.jpg\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">200<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">150<\/span> }\n        ]\n    },\n    {\n        <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/images\/image2_1600x900.jpg\"<\/span>,\n        <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">1600<\/span>,\n        <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">900<\/span>,\n        <span class=\"hljs-attr\">images<\/span>: &#91;\n            { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/images\/image2_800x450.jpg\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">800<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">450<\/span> },\n            { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/images\/image2_400x225.jpg\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">400<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">225<\/span> }\n        ]\n    }\n];\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">Gallery<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">PhotoAlbum<\/span> <span class=\"hljs-attr\">layout<\/span>=<span class=\"hljs-string\">\"rows\"<\/span> <span class=\"hljs-attr\">photos<\/span>=<span class=\"hljs-string\">{photos}<\/span> \/&gt;<\/span><\/span>;\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>So, without Cloudinary, you\u2019d need to create and store at least an additional two more variants of each image.<\/p>\n<p>With Cloudinary, you can replace the <code>src<\/code> strings in the above code with delivery URLs that include transformation parameters, so rather than storing six different images, you store two images and create the resized versions on the fly:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> PhotoAlbum <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react-photo-album\"<\/span>;\n\n<span class=\"hljs-keyword\">const<\/span> photos = &#91;\n    {\n        <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,h_600,w_800\/docs\/image1\"<\/span>,\n        <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">800<\/span>,\n        <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">600<\/span>,\n        <span class=\"hljs-attr\">images<\/span>: &#91;\n            { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,h_300,w_400\/docs\/image1\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">400<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">300<\/span> },\n            { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,h_150,w_200\/docs\/image1\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">200<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">150<\/span> }\n        ]\n    },\n    {\n        <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,h_900,w_1600\/docs\/image2\"<\/span>,\n        <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">1600<\/span>,\n        <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">900<\/span>,\n        <span class=\"hljs-attr\">images<\/span>: &#91;\n            { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,h_450,w_800\/docs\/image2\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">800<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">450<\/span> },\n            { <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,h_225,w_400\/docs\/image2\"<\/span>, <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">400<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">225<\/span> }\n        ]\n    }\n];\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">Gallery<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">PhotoAlbum<\/span> <span class=\"hljs-attr\">layout<\/span>=<span class=\"hljs-string\">\"rows\"<\/span> <span class=\"hljs-attr\">photos<\/span>=<span class=\"hljs-string\">{photos}<\/span> \/&gt;<\/span><\/span>;\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Optimizing for Delivery<\/h2>\n<p>To make the images load fast, the app optimizes them for delivery. This is good practice for any images you want to deliver from Cloudinary, regardless of any other transformations that you apply.<\/p>\n<p>The three basic factors in <a href=\"https:\/\/cloudinary.com\/documentation\/image_optimization\">optimizing images<\/a> for delivery, are the dimensions, format and compression (quality). By adding transformation parameters to the delivery URL, you can optimize your images in a flash:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/c_scale,h_488,w_960\\\/f_auto\\\/q_auto\\\/docs\\\/cars\\\/car5&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;crop_mode&quot;:&quot;scale&quot;,&quot;height&quot;:&quot;488&quot;,&quot;width&quot;:&quot;960&quot;},{&quot;format&quot;:&quot;auto&quot;},{&quot;quality&quot;:&quot;auto&quot;}],&quot;transformation_string&quot;:&quot;c_scale,h_488,w_960\\\/f_auto\\\/q_auto&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:null,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;docs\\\/cars\\\/car5&quot;,&quot;extension&quot;:&quot;&quot;,&quot;format&quot;:&quot;auto&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,h_488,w_960\/f_auto\/q_auto\/docs\/cars\/car5\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/c_scale,h_488,w_960\/f_auto\/q_auto\/w_500\/docs\/cars\/car5\" alt=\"Image showing a Mercedes original photo optimized for delivery and compression for the product image background removal and add product image shadow project with React and Cloudinary\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"500\" height=\"254\"\/><\/a><\/p>\n<p>Here\u2019s what the transformation parameters mean:<\/p>\n<ul>\n<li>\n<code>c_scale,h_488,w_960<\/code>: scale the image to a height of 488 pixels and a width of 960 pixels<\/li>\n<li>\n<code>f_auto<\/code>: let Cloudinary determine the <a href=\"https:\/\/cloudinary.com\/guides\/image-formats\/best-image-format\">best image format<\/a> for the requesting browser<\/li>\n<li>\n<code>q_auto<\/code>: let Cloudinary determine the best level of compression to apply to reduce the file size with minimal impact to quality<\/li>\n<\/ul>\n<p>You can build URLs like these using the Cloudinary React SDK, and specifically the <code>@cloudinary\/url-gen<\/code> package.  Look at <a href=\"https:\/\/github.com\/cloudinary-devs\/react-dropshadow\/blob\/main\/src\/OriginalUrl.js\" target=\"_blank\">OriginalUrl.js<\/a> to see how to build the above delivery URL in React:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> cld <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/cld\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { scale } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@cloudinary\/url-gen\/actions\/resize\"<\/span>;\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">getOriginalUrl<\/span>(<span class=\"hljs-params\">publicID, width, height<\/span>) <\/span>{\n\n <span class=\"hljs-comment\">\/\/ Scale the image to the specified dimensions<\/span>\n <span class=\"hljs-comment\">\/\/ and optimize format and quality<\/span>\n <span class=\"hljs-keyword\">const<\/span> myImage = cld.image(publicID)\n   .resize(scale().width(width).height(height))\n   .format(<span class=\"hljs-string\">'auto'<\/span>)\n   .quality(<span class=\"hljs-string\">'auto'<\/span>);\n\n <span class=\"hljs-comment\">\/\/ Return the URL of the image<\/span>\n <span class=\"hljs-keyword\">return<\/span> myImage.toURL();\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>First, we import <code>cld<\/code>. This is the Cloudinary instance that\u2019s created once for the app in <strong>cld.js<\/strong>:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { Cloudinary } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@cloudinary\/url-gen\"<\/span>;\n\n<span class=\"hljs-comment\">\/\/ Create a Cloudinary instance and set your cloud name.<\/span>\n<span class=\"hljs-keyword\">const<\/span> cld = <span class=\"hljs-keyword\">new<\/span> Cloudinary({\n <span class=\"hljs-attr\">cloud<\/span>: {\n   <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-string\">\"demo\"<\/span>\n }\n});\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> cld;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>If you want to use images from your own Cloudinary account, then this is where you need to specify the <a href=\"https:\/\/cloudinary.com\/documentation\/finding_your_credentials_tutorial\">cloud name<\/a> of your product environment.<\/p>\n<p><code>myImage<\/code> is a CloudinaryImage instance, created from the public ID of the image stored in Cloudinary:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">const<\/span> myImage = cld.image(publicID);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The public ID of the car image above is <code>docs\/cars\/car5<\/code>, which is set in <strong>PhotoAlbum.js<\/strong> and passed to <code>getOriginalUrl<\/code> as a parameter, together with the width and height of the image.<\/p>\n<p>To resize and optimize the image, apply the <code>resize<\/code>, <code>format<\/code> and <code>quality<\/code> actions to <code>myImage<\/code> (notice you need to import the <code>scale<\/code> action too):<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { scale } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@cloudinary\/url-gen\/actions\/resize\"<\/span>; \n\u2026\n<span class=\"hljs-keyword\">const<\/span> myImage = cld.image(publicID)\n   .resize(scale().width(width).height(height))\n   .format(<span class=\"hljs-string\">'auto'<\/span>)\n   .quality(<span class=\"hljs-string\">'auto'<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Finally, the <code>toURL()<\/code> function, called on <code>myImage<\/code>, returns the URL of the image to deliver.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">return<\/span> myImage.toURL();\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Image Background React JS | Background Removal in React<\/h2>\n<p>Take a look at <a href=\"https:\/\/github.com\/cloudinary-devs\/react-dropshadow\/blob\/main\/src\/RemoveBackground.js\" target=\"_blank\">RemoveBackground.js<\/a> to see the code required for background removal in React:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { backgroundRemoval } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@cloudinary\/url-gen\/actions\/effect\"<\/span>;\n\u2026\nmyImage.effect(backgroundRemoval());\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>You\u2019ll be familiar with the rest of the code in this file from <strong>OriginalUrl.js<\/strong>, as described in <a href=\"#optimizing_for_delivery\">Optimizing for delivery<\/a>.<\/p>\n<p>The returned URL includes the resizing and optimization parameters too, and will look something like this, depending on the parameters passed into <code>getBackgroundRemovedUrl<\/code>:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/e_background_removal\\\/c_scale,h_975,w_1920\\\/\\\/f_auto\\\/q_auto\\\/docs\\\/cars\\\/car5&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;effect&quot;:&quot;background_removal&quot;},{&quot;crop_mode&quot;:&quot;scale&quot;,&quot;height&quot;:&quot;975&quot;,&quot;width&quot;:&quot;1920&quot;}],&quot;transformation_string&quot;:&quot;e_background_removal\\\/c_scale,h_975,w_1920&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:null,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;\\\/f_auto\\\/q_auto\\\/docs\\\/cars\\\/car5&quot;,&quot;extension&quot;:&quot;&quot;,&quot;format&quot;:&quot;&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/c_scale,h_975,w_1920\/\/f_auto\/q_auto\/docs\/cars\/car5\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/c_scale,h_975,w_1920\/w_500\/\/f_auto\/q_auto\/docs\/cars\/car5\" alt=\"Image showing a Mercedes photo with background removed and optimized for delivery for the product image background removal and add product image shadow project with React and Cloudinary\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"500\" height=\"254\"\/><\/a><\/p>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>How About React Native? React Native Remove Image Background<\/h2>\n<p>For those working with React Native, an alternative to Cloudinary is the <code>react-native-background-remover<\/code> library. This library provides a function called <code>removeBackground()<\/code>, designed specifically for mobile application scenarios.<\/p>\n<p>To make use of this library in a React Native application, first, you need to install it. Once that\u2019s done, importing and utilizing it is quite straightforward.<\/p>\n<p>Here\u2019s a basic example:<\/p>\n<pre class=\"prettyprint\">import React, { useState } from 'react';\nimport { Image, View, Button } from 'react-native';\nimport BackgroundRemover from 'react-native-background-remover';\n\nconst App = () => {\n  const [image, setImage] = useState(null);\n\n  const handleImageChange = (event) => {\n    setImage(event.target.files[0]);\n  };\n\n  const removeBackground = async () => {\n    const { data } = await BackgroundRemover.removeBackground(image);\n    setImage(data);\n  };\n\n  return (\n    &lt;View style={{ flex: 1 }}>\n      &lt;Image source={image} style={{ width: 100, height: 100 }} \/>\n      &lt;Button title=\"Remove Background\" onPress={removeBackground} \/>\n    &lt;\/View>\n  );\n};\n\nexport default App;\n<\/pre>\n<p>A thing to note when working with React Native is the introduction of native UI components like <code>Image<\/code>, <code>View<\/code>, and<code> Button<\/code>. This code also introduces the <code>useState<\/code> hook within a functional component and an event handler tailored to React Native.<\/p>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Drop Shadow in React<\/h2>\n<p>When discussing the number of images required for this app <a href=\"#displaying_the_images\">earlier<\/a>, I didn\u2019t mention the extra 16,200,000 images per product set you\u2019d need to cover all variations of the drop shadow effect! (And that\u2019s not including the many variations of size, format and compression!)  Thanks to Cloudinary, we don\u2019t have to create and store each of these manually.  We don\u2019t even have to create them at all, if they\u2019re not requested.<\/p>\n<p>In <a href=\"https:\/\/github.com\/cloudinary-devs\/react-dropshadow\/blob\/main\/src\/RemoveBackgroundAddShadow.js\" target=\"_blank\">RemoveBackgroundAddShadow.js<\/a>, you\u2019ll see the React code required to add the drop shadow effect:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { dropShadow } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@cloudinary\/url-gen\/actions\/effect\"<\/span>;\n\u2026 \nmyImage.effect(dropShadow().azimuth(az).elevation(el).spread(spr));\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Everything else is the same as in <strong>RemoveBackground.js<\/strong> as we\u2019re adding the drop shadow to the background-removed images and applying the optimization as before.<\/p>\n<p>Again, the returned URL includes the resizing and optimization parameters too, and will look something like this, depending on the parameters passed into <code>getBackgroundRemovedShadowUrl<\/code>:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/e_background_removal\\\/e_dropshadow:azimuth_45;elevation_69;spread_50\\\/c_scale,h_975,w_1920\\\/\\\/f_auto\\\/q_auto\\\/docs\\\/cars\\\/car5&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;effect&quot;:&quot;background_removal&quot;},{&quot;effect&quot;:&quot;dropshadow:azimuth_45;elevation_69;spread_50&quot;},{&quot;crop_mode&quot;:&quot;scale&quot;,&quot;height&quot;:&quot;975&quot;,&quot;width&quot;:&quot;1920&quot;}],&quot;transformation_string&quot;:&quot;e_background_removal\\\/e_dropshadow:azimuth_45;elevation_69;spread_50\\\/c_scale,h_975,w_1920&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:null,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;\\\/f_auto\\\/q_auto\\\/docs\\\/cars\\\/car5&quot;,&quot;extension&quot;:&quot;&quot;,&quot;format&quot;:&quot;&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/e_dropshadow:azimuth_45;elevation_69;spread_50\/c_scale,h_975,w_1920\/\/f_auto\/q_auto\/docs\/cars\/car5\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/e_dropshadow:azimuth_45;elevation_69;spread_50\/c_scale,h_975,w_1920\/w_500\/\/f_auto\/q_auto\/docs\/cars\/car5\" alt=\"Image showing a Mercedes photo with background removed and drop shadow added for the product image background removal and add product image shadow project with React and Cloudinary\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"500\" height=\"254\"\/><\/a><\/p>\n<p>When using the app, you\u2019ll notice that it may take a few seconds to generate the images with drop shadow, and that\u2019s because they haven\u2019t been requested before. Once the images have already been requested, they\u2019ll be cached on the CDN and will appear fast.<\/p>\n<p>Applying background removal and drop shadow in a function such as <code>getBackgroundRemovedShadowUrl<\/code> demonstrates how scalable this solution is. The same transformation can be applied to as many images as you like. And if you need to tweak a parameter, then it\u2019ll take just a few moments to re-apply shadow from the same light source to all the images.<\/p>\n<p>Here\u2019s a snippet from the <a href=\"https:\/\/github.com\/cloudinary-devs\/react-dropshadow\/blob\/main\/src\/components\/PhotoAlbum.js\" target=\"_blank\">PhotoAlbum.js<\/a> file showing the <code>getBackgroundRemovedShadowUrl<\/code> function being called for each of the <code>src<\/code> properties:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">  <span class=\"hljs-keyword\">else<\/span> <span class=\"hljs-keyword\">if<\/span> (props.data.displayOption === <span class=\"hljs-string\">\"shadow\"<\/span>) {\n     <span class=\"hljs-keyword\">for<\/span> (<span class=\"hljs-keyword\">let<\/span> i=<span class=\"hljs-number\">0<\/span>; i&lt;<span class=\"hljs-number\">5<\/span>; i++)\n     {\n         photos.push({ <span class=\"hljs-attr\">src<\/span>: getBackgroundRemovedShadowUrl(publicIds&#91;i], widths&#91;i], heights&#91;i],\n           props.data.az, props.data.el, props.data.spr), <span class=\"hljs-attr\">width<\/span>: widths&#91;i], <span class=\"hljs-attr\">height<\/span>: heights&#91;i],\n           <span class=\"hljs-attr\">images<\/span>: &#91;\n             { <span class=\"hljs-attr\">src<\/span>: getBackgroundRemovedShadowUrl(publicIds&#91;i], <span class=\"hljs-built_in\">Math<\/span>.ceil(widths&#91;i]\/<span class=\"hljs-number\">2<\/span>), <span class=\"hljs-built_in\">Math<\/span>.ceil(heights&#91;i]\/<span class=\"hljs-number\">2<\/span>),\n               props.data.az, props.data.el, props.data.spr),\n               <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-built_in\">Math<\/span>.ceil(widths&#91;i]\/<span class=\"hljs-number\">2<\/span>), <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-built_in\">Math<\/span>.ceil(heights&#91;i]\/<span class=\"hljs-number\">2<\/span>) },\n             { <span class=\"hljs-attr\">src<\/span>: getBackgroundRemovedShadowUrl(publicIds&#91;i], <span class=\"hljs-built_in\">Math<\/span>.ceil(widths&#91;i]\/<span class=\"hljs-number\">4<\/span>), <span class=\"hljs-built_in\">Math<\/span>.ceil(heights&#91;i]\/<span class=\"hljs-number\">4<\/span>),\n               props.data.az, props.data.el, props.data.spr),\n               <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-built_in\">Math<\/span>.ceil(widths&#91;i]\/<span class=\"hljs-number\">4<\/span>), <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-built_in\">Math<\/span>.ceil(heights&#91;i]\/<span class=\"hljs-number\">4<\/span>) }\n           ]});\n     }\n }\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Advanced Images<\/h2>\n<p>The Cloudinary React SDK has a built-in <code>AdvancedImage<\/code> component that you can use to display images.  It comes with plugins that provide extra functionality, such as responsiveness, lazy loading, accessibility and placeholders.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">import {AdvancedImage, lazyload, accessibility, responsive, placeholder} from '@cloudinary\/react';\n\u2026\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">AdvancedImage<\/span> <span class=\"hljs-attr\">cldImg<\/span>=<span class=\"hljs-string\">{myImage}<\/span> <span class=\"hljs-attr\">plugins<\/span>=<span class=\"hljs-string\">{&#91;lazyload(),<\/span> <span class=\"hljs-attr\">responsive<\/span>(), <span class=\"hljs-attr\">accessibility<\/span>(), <span class=\"hljs-attr\">placeholder<\/span>()]}\/&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Up for a challenge?  Try modifying the app to use <code>AdvancedImage<\/code> components instead of the <code>PhotoAlbum<\/code> component.<\/p>\n<p>If you\u2019re working with React Native, you might want to explore similar advanced components or features tailored for mobile apps. Always remember, regardless of the platform \u2013 web or mobile \u2013 the essence remains: optimizing images for a seamless user experience. And with tools like Cloudinary and <code>react-native-background-remover<\/code>, developers are equipped to achieve just that.<\/p>\n<p>You can learn more about the <a href=\"https:\/\/cloudinary.com\/documentation\/react_image_transformations#image_transformations_with_react\">AdvancedImage component<\/a> and its <a href=\"https:\/\/cloudinary.com\/documentation\/react_image_transformations#plugins\">plugins<\/a> in the <a href=\"https:\/\/cloudinary.com\/documentation\/react_integration\">React SDK guide<\/a>.<\/p>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Back to the Future<\/h2>\n<p>There are many different use cases for background removal and drop shadow beyond product image background removal or adding a product image shadow, and of course, Cloudinary has a variety of <a href=\"https:\/\/cloudinary.com\/documentation\/cloudinary_sdks\">SDKs<\/a> for your preferred coding environment.<\/p>\n<p>The following animated image was created from one image with the light source set at different points representing the sun\u2019s cycle, so with azimuth starting from the east (90\u00b0), heading round to the north (0\u00b0), and ending in the west (270\u00b0).  The elevation starts from 0\u00b0, peaks at 90\u00b0, and ends back at 0\u00b0, when the sun \u2018sets\u2019 in the west:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;car-dropshadow.png\\&quot;, {fetch_format: \\&quot;png\\&quot;, type: \\&quot;multi\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;car-dropshadow.png\\&quot;, {fetch_format: \\&quot;png\\&quot;, type: \\&quot;multi\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;car-dropshadow.png\\&quot; type=\\&quot;multi\\&quot;&gt; &lt;Transformation fetchFormat=\\&quot;png\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;car-dropshadow.png\\&quot; type=\\&quot;multi\\&quot;&gt;\\n\\t&lt;Transformation fetchFormat=\\&quot;png\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;car-dropshadow.png\\&quot; type=\\&quot;multi\\&quot;&gt; &lt;cld-transformation fetch-format=\\&quot;png\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;car-dropshadow.png\\&quot; type=\\&quot;multi\\&quot;&gt;\\n\\t&lt;cld-transformation fetch-format=\\&quot;png\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;car-dropshadow.png\\&quot; type=\\&quot;multi\\&quot;&gt; &lt;cl-transformation fetch-format=\\&quot;png\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;car-dropshadow.png\\&quot; type=\\&quot;multi\\&quot;&gt;\\n\\t&lt;cl-transformation fetch-format=\\&quot;png\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;car-dropshadow.png&#039;, {fetchFormat: \\&quot;png\\&quot;, type: \\&quot;multi\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;car-dropshadow.png&#039;, {fetchFormat: \\&quot;png\\&quot;, type: \\&quot;multi\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;).image(fetch_format=\\&quot;png\\&quot;, type=\\&quot;multi\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;).image(fetch_format=\\&quot;png\\&quot;, type=\\&quot;multi\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;car-dropshadow.png&#039;))\\n\\t-&gt;delivery(Delivery::format(\\n\\tFormat::png()))\\n\\t-&gt;deliveryType(\\&quot;multi\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;car-dropshadow.png&#039;))\\n\\t-&gt;delivery(Delivery::format(\\n\\tFormat::png()))\\n\\t-&gt;deliveryType(\\&quot;multi\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;car-dropshadow.png\\&quot;, array(\\&quot;fetch_format\\&quot;=&gt;\\&quot;png\\&quot;, \\&quot;type\\&quot;=&gt;\\&quot;multi\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;car-dropshadow.png\\&quot;, array(\\&quot;fetch_format\\&quot;=&gt;\\&quot;png\\&quot;, \\&quot;type\\&quot;=&gt;\\&quot;multi\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().fetchFormat(\\&quot;png\\&quot;)).type(\\&quot;multi\\&quot;).imageTag(\\&quot;car-dropshadow.png\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().fetchFormat(\\&quot;png\\&quot;)).type(\\&quot;multi\\&quot;).imageTag(\\&quot;car-dropshadow.png\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;car-dropshadow.png\\&quot;, fetch_format: \\&quot;png\\&quot;, type: \\&quot;multi\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;car-dropshadow.png\\&quot;, fetch_format: \\&quot;png\\&quot;, type: \\&quot;multi\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().FetchFormat(\\&quot;png\\&quot;)).Action(\\&quot;multi\\&quot;).BuildImageTag(\\&quot;car-dropshadow.png\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().FetchFormat(\\&quot;png\\&quot;)).Action(\\&quot;multi\\&quot;).BuildImageTag(\\&quot;car-dropshadow.png\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;car-dropshadow.png&#039;).transformation(Transformation()\\n\\t.delivery(Delivery.format(\\n\\tFormat.png()))\\n\\t.setDeliveryType(\\&quot;multi\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;car-dropshadow.png&#039;).transformation(Transformation()\\n\\t.delivery(Delivery.format(\\n\\tFormat.png()))\\n\\t.setDeliveryType(\\&quot;multi\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setType( \\&quot;multi\\&quot;).setTransformation(CLDTransformation().setFetchFormat(\\&quot;png\\&quot;)).generate(\\&quot;car-dropshadow.png\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setType( \\&quot;multi\\&quot;).setTransformation(CLDTransformation().setFetchFormat(\\&quot;png\\&quot;)).generate(\\&quot;car-dropshadow.png\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().fetchFormat(\\&quot;png\\&quot;)).type(\\&quot;multi\\&quot;).generate(\\&quot;car-dropshadow.png\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().fetchFormat(\\&quot;png\\&quot;)).type(\\&quot;multi\\&quot;).generate(\\&quot;car-dropshadow.png\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;car-dropshadow.png&#039;).transformation(Transformation()\\n\\t.delivery(Delivery.format(\\n\\tFormat.png()))\\n\\t.setDeliveryType(\\&quot;multi\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;car-dropshadow.png&#039;).transformation(Transformation()\\n\\t.delivery(Delivery.format(\\n\\tFormat.png()))\\n\\t.setDeliveryType(\\&quot;multi\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;car-dropshadow.png\\&quot;)\\n\\t delivery(Delivery.format(\\n\\tFormat.png()))\\n\\t deliveryType(\\&quot;multi\\&quot;) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;car-dropshadow.png\\&quot;)\\n\\t delivery(Delivery.format(\\n\\tFormat.png()))\\n\\t deliveryType(\\&quot;multi\\&quot;) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;car-dropshadow.png\\&quot;, {fetch_format: \\&quot;png\\&quot;, type: \\&quot;multi\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;car-dropshadow.png\\&quot;, {fetch_format: \\&quot;png\\&quot;, type: \\&quot;multi\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;car-dropshadow.png\\&quot;)\\n  .delivery(format(png()))\\n  .setDeliveryType(\\&quot;multi\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/multi\\\/f_png\\\/car-dropshadow.png&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;multi&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;format&quot;:&quot;png&quot;}],&quot;transformation_string&quot;:&quot;f_png&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;car-dropshadow.png&quot;,&quot;extension&quot;:&quot;png&quot;,&quot;format&quot;:&quot;png&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/multi\/f_png\/car-dropshadow.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/multi\/f_png\/w_500\/car-dropshadow.png\" alt=\"Image showing a Mercedes with the shadow animated for the product image background removal and add product image shadow project with React and Cloudinary\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"500\" height=\"254\"\/><\/a><\/p>\n<p>The node script used to create this animation can be found in <a href=\"https:\/\/github.com\/cloudinary-devs\/drop-shadow-animation\">GitHub<\/a>.<\/p>\n<p>Removing the background of an image on the fly, you can add an <a href=\"https:\/\/cloudinary.com\/documentation\/layers#image_underlays\">underlay<\/a> of a different scene behind the object, rather than leaving it blank.<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;, {transformation: [ {effect: \\&quot;background_removal\\&quot;}, {angle: 15}, {underlay: \\&quot;docs:sky\\&quot;, width: \\&quot;0.5\\&quot;, crop: \\&quot;scale\\&quot;}, {flags: \\&quot;layer_apply\\&quot;} ]})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;, {transformation: [\\n  {effect: \\&quot;background_removal\\&quot;},\\n  {angle: 15},\\n  {underlay: \\&quot;docs:sky\\&quot;, width: \\&quot;0.5\\&quot;, crop: \\&quot;scale\\&quot;},\\n  {flags: \\&quot;layer_apply\\&quot;}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot; &gt; &lt;Transformation effect=\\&quot;background_removal\\&quot; \\\/&gt; &lt;Transformation angle=\\&quot;15\\&quot; \\\/&gt; &lt;Transformation underlay=\\&quot;docs:sky\\&quot; width=\\&quot;0.5\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt; &lt;Transformation flags=\\&quot;layer_apply\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot; &gt;\\n\\t&lt;Transformation effect=\\&quot;background_removal\\&quot; \\\/&gt;\\n\\t&lt;Transformation angle=\\&quot;15\\&quot; \\\/&gt;\\n\\t&lt;Transformation underlay=\\&quot;docs:sky\\&quot; width=\\&quot;0.5\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt;\\n\\t&lt;Transformation flags=\\&quot;layer_apply\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot; &gt; &lt;cld-transformation effect=\\&quot;background_removal\\&quot; \\\/&gt; &lt;cld-transformation angle=\\&quot;15\\&quot; \\\/&gt; &lt;cld-transformation :underlay=\\&quot;docs:sky\\&quot; width=\\&quot;0.5\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt; &lt;cld-transformation flags=\\&quot;layer_apply\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation effect=\\&quot;background_removal\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation angle=\\&quot;15\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation :underlay=\\&quot;docs:sky\\&quot; width=\\&quot;0.5\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation flags=\\&quot;layer_apply\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot; &gt; &lt;cl-transformation effect=\\&quot;background_removal\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation angle=\\&quot;15\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation underlay=\\&quot;docs:sky\\&quot; width=\\&quot;0.5\\&quot; crop=\\&quot;scale\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation flags=\\&quot;layer_apply\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation effect=\\&quot;background_removal\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation angle=\\&quot;15\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation underlay=\\&quot;docs:sky\\&quot; width=\\&quot;0.5\\&quot; crop=\\&quot;scale\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation flags=\\&quot;layer_apply\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;docs\\\/10830466395_c9bf11e98b_b.jpg&#039;, {transformation: [ {effect: \\&quot;background_removal\\&quot;}, {angle: 15}, {underlay: new cloudinary.Layer().publicId(\\&quot;docs:sky\\&quot;), width: \\&quot;0.5\\&quot;, crop: \\&quot;scale\\&quot;}, {flags: \\&quot;layer_apply\\&quot;} ]}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;docs\\\/10830466395_c9bf11e98b_b.jpg&#039;, {transformation: [\\n  {effect: \\&quot;background_removal\\&quot;},\\n  {angle: 15},\\n  {underlay: new cloudinary.Layer().publicId(\\&quot;docs:sky\\&quot;), width: \\&quot;0.5\\&quot;, crop: \\&quot;scale\\&quot;},\\n  {flags: \\&quot;layer_apply\\&quot;}\\n  ]}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;).image(transformation=[ {&#039;effect&#039;: \\&quot;background_removal\\&quot;}, {&#039;angle&#039;: 15}, {&#039;underlay&#039;: \\&quot;docs:sky\\&quot;, &#039;width&#039;: \\&quot;0.5\\&quot;, &#039;crop&#039;: \\&quot;scale\\&quot;}, {&#039;flags&#039;: \\&quot;layer_apply\\&quot;} ])&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;).image(transformation=[\\n  {&#039;effect&#039;: \\&quot;background_removal\\&quot;},\\n  {&#039;angle&#039;: 15},\\n  {&#039;underlay&#039;: \\&quot;docs:sky\\&quot;, &#039;width&#039;: \\&quot;0.5\\&quot;, &#039;crop&#039;: \\&quot;scale\\&quot;},\\n  {&#039;flags&#039;: \\&quot;layer_apply\\&quot;}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;docs\\\/10830466395_c9bf11e98b_b.jpg&#039;))\\n\\t-&gt;effect(Effect::backgroundRemoval())\\n\\t-&gt;rotate(Rotate::byAngle(15))\\n\\t-&gt;underlay(Underlay::source(\\n\\tSource::image(\\&quot;docs\\\/sky\\&quot;)\\n\\t-&gt;transformation((new Transformation())\\n\\t-&gt;resize(Resize::scale()-&gt;width(0.5)))\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;docs\\\/10830466395_c9bf11e98b_b.jpg&#039;))\\n\\t-&gt;effect(Effect::backgroundRemoval())\\n\\t-&gt;rotate(Rotate::byAngle(15))\\n\\t-&gt;underlay(Underlay::source(\\n\\tSource::image(\\&quot;docs\\\/sky\\&quot;)\\n\\t-&gt;transformation((new Transformation())\\n\\t-&gt;resize(Resize::scale()-&gt;width(0.5)))\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array( array(\\&quot;effect\\&quot;=&gt;\\&quot;background_removal\\&quot;), array(\\&quot;angle\\&quot;=&gt;15), array(\\&quot;underlay\\&quot;=&gt;\\&quot;docs:sky\\&quot;, \\&quot;width\\&quot;=&gt;\\&quot;0.5\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;scale\\&quot;), array(\\&quot;flags\\&quot;=&gt;\\&quot;layer_apply\\&quot;) )))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array(\\n  array(\\&quot;effect\\&quot;=&gt;\\&quot;background_removal\\&quot;),\\n  array(\\&quot;angle\\&quot;=&gt;15),\\n  array(\\&quot;underlay\\&quot;=&gt;\\&quot;docs:sky\\&quot;, \\&quot;width\\&quot;=&gt;\\&quot;0.5\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;scale\\&quot;),\\n  array(\\&quot;flags\\&quot;=&gt;\\&quot;layer_apply\\&quot;)\\n  )))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().effect(\\&quot;background_removal\\&quot;).chain() .angle(15).chain() .underlay(new Layer().publicId(\\&quot;docs:sky\\&quot;)).width(0.5).crop(\\&quot;scale\\&quot;).chain() .flags(\\&quot;layer_apply\\&quot;)).imageTag(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation()\\n  .effect(\\&quot;background_removal\\&quot;).chain()\\n  .angle(15).chain()\\n  .underlay(new Layer().publicId(\\&quot;docs:sky\\&quot;)).width(0.5).crop(\\&quot;scale\\&quot;).chain()\\n  .flags(\\&quot;layer_apply\\&quot;)).imageTag(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;, transformation: [ {effect: \\&quot;background_removal\\&quot;}, {angle: 15}, {underlay: \\&quot;docs:sky\\&quot;, width: 0.5, crop: \\&quot;scale\\&quot;}, {flags: \\&quot;layer_apply\\&quot;} ])&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;, transformation: [\\n  {effect: \\&quot;background_removal\\&quot;},\\n  {angle: 15},\\n  {underlay: \\&quot;docs:sky\\&quot;, width: 0.5, crop: \\&quot;scale\\&quot;},\\n  {flags: \\&quot;layer_apply\\&quot;}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Effect(\\&quot;background_removal\\&quot;).Chain() .Angle(15).Chain() .Underlay(new Layer().PublicId(\\&quot;docs:sky\\&quot;)).Width(0.5).Crop(\\&quot;scale\\&quot;).Chain() .Flags(\\&quot;layer_apply\\&quot;)).BuildImageTag(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation()\\n  .Effect(\\&quot;background_removal\\&quot;).Chain()\\n  .Angle(15).Chain()\\n  .Underlay(new Layer().PublicId(\\&quot;docs:sky\\&quot;)).Width(0.5).Crop(\\&quot;scale\\&quot;).Chain()\\n  .Flags(\\&quot;layer_apply\\&quot;)).BuildImageTag(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/10830466395_c9bf11e98b_b.jpg&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval())\\n\\t.rotate(Rotate.byAngle(15))\\n\\t.underlay(Underlay.source(\\n\\tSource.image(\\&quot;docs\\\/sky\\&quot;)\\n\\t.transformation(new Transformation()\\n\\t.resize(Resize.scale().width(0.5)))\\n\\t)));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/10830466395_c9bf11e98b_b.jpg&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval())\\n\\t.rotate(Rotate.byAngle(15))\\n\\t.underlay(Underlay.source(\\n\\tSource.image(\\&quot;docs\\\/sky\\&quot;)\\n\\t.transformation(new Transformation()\\n\\t.resize(Resize.scale().width(0.5)))\\n\\t)));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setEffect(\\&quot;background_removal\\&quot;).chain() .setAngle(15).chain() .setUnderlay(\\&quot;docs:sky\\&quot;).setWidth(0.5).setCrop(\\&quot;scale\\&quot;).chain() .setFlags(\\&quot;layer_apply\\&quot;)).generate(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()\\n  .setEffect(\\&quot;background_removal\\&quot;).chain()\\n  .setAngle(15).chain()\\n  .setUnderlay(\\&quot;docs:sky\\&quot;).setWidth(0.5).setCrop(\\&quot;scale\\&quot;).chain()\\n  .setFlags(\\&quot;layer_apply\\&quot;)).generate(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().effect(\\&quot;background_removal\\&quot;).chain() .angle(15).chain() .underlay(new Layer().publicId(\\&quot;docs:sky\\&quot;)).width(0.5).crop(\\&quot;scale\\&quot;).chain() .flags(\\&quot;layer_apply\\&quot;)).generate(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation()\\n  .effect(\\&quot;background_removal\\&quot;).chain()\\n  .angle(15).chain()\\n  .underlay(new Layer().publicId(\\&quot;docs:sky\\&quot;)).width(0.5).crop(\\&quot;scale\\&quot;).chain()\\n  .flags(\\&quot;layer_apply\\&quot;)).generate(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/10830466395_c9bf11e98b_b.jpg&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval())\\n\\t.rotate(Rotate.byAngle(15))\\n\\t.underlay(Underlay.source(\\n\\tSource.image(\\&quot;docs\\\/sky\\&quot;)\\n\\t.transformation(new Transformation()\\n\\t.resize(Resize.scale().width(0.5)))\\n\\t)));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;docs\\\/10830466395_c9bf11e98b_b.jpg&#039;).transformation(Transformation()\\n\\t.effect(Effect.backgroundRemoval())\\n\\t.rotate(Rotate.byAngle(15))\\n\\t.underlay(Underlay.source(\\n\\tSource.image(\\&quot;docs\\\/sky\\&quot;)\\n\\t.transformation(new Transformation()\\n\\t.resize(Resize.scale().width(0.5)))\\n\\t)));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n\\t effect(Effect.backgroundRemoval())\\n\\t rotate(Rotate.byAngle(15))\\n\\t underlay(Underlay.source(\\n\\tSource.image(\\&quot;docs\\\/sky\\&quot;) {\\n\\t transformation(Transformation {\\n\\t resize(Resize.scale() { width(0.5F) }) })\\n\\t })) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n\\t effect(Effect.backgroundRemoval())\\n\\t rotate(Rotate.byAngle(15))\\n\\t underlay(Underlay.source(\\n\\tSource.image(\\&quot;docs\\\/sky\\&quot;) {\\n\\t transformation(Transformation {\\n\\t resize(Resize.scale() { width(0.5F) }) })\\n\\t })) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;, {transformation: [ {effect: \\&quot;background_removal\\&quot;}, {angle: 15}, {underlay: new cloudinary.Layer().publicId(\\&quot;docs:sky\\&quot;), width: \\&quot;0.5\\&quot;, crop: \\&quot;scale\\&quot;}, {flags: \\&quot;layer_apply\\&quot;} ]})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;, {transformation: [\\n  {effect: \\&quot;background_removal\\&quot;},\\n  {angle: 15},\\n  {underlay: new cloudinary.Layer().publicId(\\&quot;docs:sky\\&quot;), width: \\&quot;0.5\\&quot;, crop: \\&quot;scale\\&quot;},\\n  {flags: \\&quot;layer_apply\\&quot;}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;docs\\\/10830466395_c9bf11e98b_b.jpg\\&quot;)\\n  .effect(backgroundRemoval())\\n  .rotate(byAngle(15))\\n  .underlay(\\n    source(\\n      image(\\&quot;docs\\\/sky\\&quot;).transformation(\\n        new Transformation().resize(scale().width(0.5))\\n      )\\n    )\\n  );&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/e_background_removal\\\/a_15\\\/u_docs:sky,c_scale,w_0.5\\\/fl_layer_apply\\\/docs\\\/10830466395_c9bf11e98b_b.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;effect&quot;:&quot;background_removal&quot;},{&quot;angle&quot;:&quot;15&quot;},{&quot;underlay&quot;:&quot;docs:sky&quot;,&quot;crop_mode&quot;:&quot;scale&quot;,&quot;width&quot;:&quot;0.5&quot;},{&quot;flags&quot;:&quot;layer_apply&quot;}],&quot;transformation_string&quot;:&quot;e_background_removal\\\/a_15\\\/u_docs:sky,c_scale,w_0.5\\\/fl_layer_apply&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:null,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;docs\\\/10830466395_c9bf11e98b_b.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/a_15\/u_docs:sky,c_scale,w_0.5\/fl_layer_apply\/docs\/10830466395_c9bf11e98b_b.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/e_background_removal\/a_15\/u_docs:sky,c_scale,w_0.5\/fl_layer_apply\/w_500\/docs\/10830466395_c9bf11e98b_b.jpg\" alt=\"Image showing a Delorian with the background replaced with the sky for the product image background removal and add product image shadow project with React and Cloudinary.\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"500\" height=\"333\"\/><\/a><\/p>\n<\/div>\n\n<div class=\"wp-block-cloudinary-markdown \"><p>Or, you can do something a bit more funky using the <a href=\"https:\/\/atroposjs.com\/\">Atropos<\/a> component, like this (mouseover the image):<\/p>\n<iframe src=\"https:\/\/codesandbox.io\/embed\/back-to-the-future-qfs1rv?fontsize=14&#038;hidenavigation=1&#038;theme=dark\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"back-to-the-future\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ><\/iframe>\n<p>You can even overlay an image with a transparent background on a video, like this:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.video(\\&quot;docs\\\/travel\\&quot;, {transformation: [ {overlay: \\&quot;docs:rmv_bgd:cool-car\\&quot;, width: \\&quot;0.2\\&quot;, crop: \\&quot;scale\\&quot;}, {flags: \\&quot;layer_apply\\&quot;, gravity: \\&quot;north\\&quot;, x: -150, y: 200} ]})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.video(\\&quot;docs\\\/travel\\&quot;, {transformation: [\\n  {overlay: \\&quot;docs:rmv_bgd:cool-car\\&quot;, width: \\&quot;0.2\\&quot;, crop: \\&quot;scale\\&quot;},\\n  {flags: \\&quot;layer_apply\\&quot;, gravity: \\&quot;north\\&quot;, x: -150, y: 200}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Video publicId=\\&quot;docs\\\/travel\\&quot; &gt; &lt;Transformation overlay=\\&quot;docs:rmv_bgd:cool-car\\&quot; width=\\&quot;0.2\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt; &lt;Transformation flags=\\&quot;layer_apply\\&quot; gravity=\\&quot;north\\&quot; x=\\&quot;-150\\&quot; y=\\&quot;200\\&quot; \\\/&gt; &lt;\\\/Video&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Video publicId=\\&quot;docs\\\/travel\\&quot; &gt;\\n\\t&lt;Transformation overlay=\\&quot;docs:rmv_bgd:cool-car\\&quot; width=\\&quot;0.2\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt;\\n\\t&lt;Transformation flags=\\&quot;layer_apply\\&quot; gravity=\\&quot;north\\&quot; x=\\&quot;-150\\&quot; y=\\&quot;200\\&quot; \\\/&gt;\\n&lt;\\\/Video&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-video public-id=\\&quot;docs\\\/travel\\&quot; &gt; &lt;cld-transformation :overlay=\\&quot;docs:rmv_bgd:cool-car\\&quot; width=\\&quot;0.2\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt; &lt;cld-transformation flags=\\&quot;layer_apply\\&quot; gravity=\\&quot;north\\&quot; x=\\&quot;-150\\&quot; y=\\&quot;200\\&quot; \\\/&gt; &lt;\\\/cld-video&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-video public-id=\\&quot;docs\\\/travel\\&quot; &gt;\\n\\t&lt;cld-transformation :overlay=\\&quot;docs:rmv_bgd:cool-car\\&quot; width=\\&quot;0.2\\&quot; crop=\\&quot;scale\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation flags=\\&quot;layer_apply\\&quot; gravity=\\&quot;north\\&quot; x=\\&quot;-150\\&quot; y=\\&quot;200\\&quot; \\\/&gt;\\n&lt;\\\/cld-video&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-video public-id=\\&quot;docs\\\/travel\\&quot; &gt; &lt;cl-transformation overlay=\\&quot;docs:rmv_bgd:cool-car\\&quot; width=\\&quot;0.2\\&quot; crop=\\&quot;scale\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation flags=\\&quot;layer_apply\\&quot; gravity=\\&quot;north\\&quot; x=\\&quot;-150\\&quot; y=\\&quot;200\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-video&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-video public-id=\\&quot;docs\\\/travel\\&quot; &gt;\\n\\t&lt;cl-transformation overlay=\\&quot;docs:rmv_bgd:cool-car\\&quot; width=\\&quot;0.2\\&quot; crop=\\&quot;scale\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation flags=\\&quot;layer_apply\\&quot; gravity=\\&quot;north\\&quot; x=\\&quot;-150\\&quot; y=\\&quot;200\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-video&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.videoTag(&#039;docs\\\/travel&#039;, {transformation: [ {overlay: new cloudinary.Layer().publicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;), width: \\&quot;0.2\\&quot;, crop: \\&quot;scale\\&quot;}, {flags: \\&quot;layer_apply\\&quot;, gravity: \\&quot;north\\&quot;, x: -150, y: 200} ]}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.videoTag(&#039;docs\\\/travel&#039;, {transformation: [\\n  {overlay: new cloudinary.Layer().publicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;), width: \\&quot;0.2\\&quot;, crop: \\&quot;scale\\&quot;},\\n  {flags: \\&quot;layer_apply\\&quot;, gravity: \\&quot;north\\&quot;, x: -150, y: 200}\\n  ]}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryVideo(\\&quot;docs\\\/travel\\&quot;).video(transformation=[ {&#039;overlay&#039;: \\&quot;docs:rmv_bgd:cool-car\\&quot;, &#039;width&#039;: \\&quot;0.2\\&quot;, &#039;crop&#039;: \\&quot;scale\\&quot;}, {&#039;flags&#039;: \\&quot;layer_apply\\&quot;, &#039;gravity&#039;: \\&quot;north\\&quot;, &#039;x&#039;: -150, &#039;y&#039;: 200} ])&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryVideo(\\&quot;docs\\\/travel\\&quot;).video(transformation=[\\n  {&#039;overlay&#039;: \\&quot;docs:rmv_bgd:cool-car\\&quot;, &#039;width&#039;: \\&quot;0.2\\&quot;, &#039;crop&#039;: \\&quot;scale\\&quot;},\\n  {&#039;flags&#039;: \\&quot;layer_apply\\&quot;, &#039;gravity&#039;: \\&quot;north\\&quot;, &#039;x&#039;: -150, &#039;y&#039;: 200}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new VideoTag(&#039;docs\\\/travel.mp4&#039;))\\n\\t-&gt;overlay(Overlay::source(\\n\\tSource::image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;)\\n\\t-&gt;transformation((new Transformation())\\n\\t-&gt;resize(Resize::scale()-&gt;width(0.2)))\\n\\t)\\n\\t-&gt;position((new Position())\\n\\t-&gt;gravity(\\n\\tGravity::compass(\\n\\tCompass::north()))\\n-&gt;offsetX(-150)\\n-&gt;offsetY(200))\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new VideoTag(&#039;docs\\\/travel.mp4&#039;))\\n\\t-&gt;overlay(Overlay::source(\\n\\tSource::image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;)\\n\\t-&gt;transformation((new Transformation())\\n\\t-&gt;resize(Resize::scale()-&gt;width(0.2)))\\n\\t)\\n\\t-&gt;position((new Position())\\n\\t-&gt;gravity(\\n\\tGravity::compass(\\n\\tCompass::north()))\\n-&gt;offsetX(-150)\\n-&gt;offsetY(200))\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_video_tag(\\&quot;docs\\\/travel\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array( array(\\&quot;overlay\\&quot;=&gt;\\&quot;docs:rmv_bgd:cool-car\\&quot;, \\&quot;width\\&quot;=&gt;\\&quot;0.2\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;scale\\&quot;), array(\\&quot;flags\\&quot;=&gt;\\&quot;layer_apply\\&quot;, \\&quot;gravity\\&quot;=&gt;\\&quot;north\\&quot;, \\&quot;x\\&quot;=&gt;-150, \\&quot;y\\&quot;=&gt;200) )))&quot;,&quot;codeSnippet&quot;:&quot;cl_video_tag(\\&quot;docs\\\/travel\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array(\\n  array(\\&quot;overlay\\&quot;=&gt;\\&quot;docs:rmv_bgd:cool-car\\&quot;, \\&quot;width\\&quot;=&gt;\\&quot;0.2\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;scale\\&quot;),\\n  array(\\&quot;flags\\&quot;=&gt;\\&quot;layer_apply\\&quot;, \\&quot;gravity\\&quot;=&gt;\\&quot;north\\&quot;, \\&quot;x\\&quot;=&gt;-150, \\&quot;y\\&quot;=&gt;200)\\n  )))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().overlay(new Layer().publicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;)).width(0.2).crop(\\&quot;scale\\&quot;).chain() .flags(\\&quot;layer_apply\\&quot;).gravity(\\&quot;north\\&quot;).x(-150).y(200)).videoTag(\\&quot;docs\\\/travel\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation()\\n  .overlay(new Layer().publicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;)).width(0.2).crop(\\&quot;scale\\&quot;).chain()\\n  .flags(\\&quot;layer_apply\\&quot;).gravity(\\&quot;north\\&quot;).x(-150).y(200)).videoTag(\\&quot;docs\\\/travel\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_video_tag(\\&quot;docs\\\/travel\\&quot;, transformation: [ {overlay: \\&quot;docs:rmv_bgd:cool-car\\&quot;, width: 0.2, crop: \\&quot;scale\\&quot;}, {flags: \\&quot;layer_apply\\&quot;, gravity: \\&quot;north\\&quot;, x: -150, y: 200} ])&quot;,&quot;codeSnippet&quot;:&quot;cl_video_tag(\\&quot;docs\\\/travel\\&quot;, transformation: [\\n  {overlay: \\&quot;docs:rmv_bgd:cool-car\\&quot;, width: 0.2, crop: \\&quot;scale\\&quot;},\\n  {flags: \\&quot;layer_apply\\&quot;, gravity: \\&quot;north\\&quot;, x: -150, y: 200}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlVideoUp.Transform(new Transformation().Overlay(new Layer().PublicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;)).Width(0.2).Crop(\\&quot;scale\\&quot;).Chain() .Flags(\\&quot;layer_apply\\&quot;).Gravity(\\&quot;north\\&quot;).X(-150).Y(200)).BuildVideoTag(\\&quot;docs\\\/travel\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlVideoUp.Transform(new Transformation()\\n  .Overlay(new Layer().PublicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;)).Width(0.2).Crop(\\&quot;scale\\&quot;).Chain()\\n  .Flags(\\&quot;layer_apply\\&quot;).Gravity(\\&quot;north\\&quot;).X(-150).Y(200)).BuildVideoTag(\\&quot;docs\\\/travel\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.video(&#039;docs\\\/travel.mp4&#039;).transformation(Transformation()\\n\\t.overlay(Overlay.source(\\n\\tSource.image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;)\\n\\t.transformation(new Transformation()\\n\\t.resize(Resize.scale().width(0.2)))\\n\\t)\\n\\t.position(Position()\\n\\t.gravity(\\n\\tGravity.compass(\\n\\tCompass.north()))\\n.offsetX(-150)\\n.offsetY(200))\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.video(&#039;docs\\\/travel.mp4&#039;).transformation(Transformation()\\n\\t.overlay(Overlay.source(\\n\\tSource.image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;)\\n\\t.transformation(new Transformation()\\n\\t.resize(Resize.scale().width(0.2)))\\n\\t)\\n\\t.position(Position()\\n\\t.gravity(\\n\\tGravity.compass(\\n\\tCompass.north()))\\n.offsetX(-150)\\n.offsetY(200))\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.createUrl().setResourceType(\\&quot;video\\&quot;).setTransformation(CLDTransformation().setOverlay(\\&quot;docs:rmv_bgd:cool-car\\&quot;).setWidth(0.2).setCrop(\\&quot;scale\\&quot;).chain() .setFlags(\\&quot;layer_apply\\&quot;).setGravity(\\&quot;north\\&quot;).setX(-150).setY(200)).generate(\\&quot;docs\\\/travel.mp4\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.createUrl().setResourceType(\\&quot;video\\&quot;).setTransformation(CLDTransformation()\\n  .setOverlay(\\&quot;docs:rmv_bgd:cool-car\\&quot;).setWidth(0.2).setCrop(\\&quot;scale\\&quot;).chain()\\n  .setFlags(\\&quot;layer_apply\\&quot;).setGravity(\\&quot;north\\&quot;).setX(-150).setY(200)).generate(\\&quot;docs\\\/travel.mp4\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().overlay(new Layer().publicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;)).width(0.2).crop(\\&quot;scale\\&quot;).chain() .flags(\\&quot;layer_apply\\&quot;).gravity(\\&quot;north\\&quot;).x(-150).y(200)).resourceType(\\&quot;video\\&quot;).generate(\\&quot;docs\\\/travel.mp4\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation()\\n  .overlay(new Layer().publicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;)).width(0.2).crop(\\&quot;scale\\&quot;).chain()\\n  .flags(\\&quot;layer_apply\\&quot;).gravity(\\&quot;north\\&quot;).x(-150).y(200)).resourceType(\\&quot;video\\&quot;).generate(\\&quot;docs\\\/travel.mp4\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.video(&#039;docs\\\/travel.mp4&#039;).transformation(Transformation()\\n\\t.overlay(Overlay.source(\\n\\tSource.image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;)\\n\\t.transformation(new Transformation()\\n\\t.resize(Resize.scale().width(0.2)))\\n\\t)\\n\\t.position(Position()\\n\\t.gravity(\\n\\tGravity.compass(\\n\\tCompass.north()))\\n.offsetX(-150)\\n.offsetY(200))\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.video(&#039;docs\\\/travel.mp4&#039;).transformation(Transformation()\\n\\t.overlay(Overlay.source(\\n\\tSource.image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;)\\n\\t.transformation(new Transformation()\\n\\t.resize(Resize.scale().width(0.2)))\\n\\t)\\n\\t.position(Position()\\n\\t.gravity(\\n\\tGravity.compass(\\n\\tCompass.north()))\\n.offsetX(-150)\\n.offsetY(200))\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.video {\\n\\tpublicId(\\&quot;docs\\\/travel.mp4\\&quot;)\\n\\t overlay(Overlay.source(\\n\\tSource.image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;) {\\n\\t transformation(Transformation {\\n\\t resize(Resize.scale() { width(0.2F) }) })\\n\\t }) {\\n\\t position(Position() {\\n\\t gravity(\\n\\tGravity.compass(\\n\\tCompass.north()))\\n offsetX(-150)\\n offsetY(200) })\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.video {\\n\\tpublicId(\\&quot;docs\\\/travel.mp4\\&quot;)\\n\\t overlay(Overlay.source(\\n\\tSource.image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;) {\\n\\t transformation(Transformation {\\n\\t resize(Resize.scale() { width(0.2F) }) })\\n\\t }) {\\n\\t position(Position() {\\n\\t gravity(\\n\\tGravity.compass(\\n\\tCompass.north()))\\n offsetX(-150)\\n offsetY(200) })\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.video(\\&quot;docs\\\/travel\\&quot;, {transformation: [ {overlay: new cloudinary.Layer().publicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;), width: \\&quot;0.2\\&quot;, crop: \\&quot;scale\\&quot;}, {flags: \\&quot;layer_apply\\&quot;, gravity: \\&quot;north\\&quot;, x: -150, y: 200} ]})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.video(\\&quot;docs\\\/travel\\&quot;, {transformation: [\\n  {overlay: new cloudinary.Layer().publicId(\\&quot;docs:rmv_bgd:cool-car\\&quot;), width: \\&quot;0.2\\&quot;, crop: \\&quot;scale\\&quot;},\\n  {flags: \\&quot;layer_apply\\&quot;, gravity: \\&quot;north\\&quot;, x: -150, y: 200}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryVideo(\\&quot;docs\\\/travel.mp4\\&quot;).overlay(\\n  source(\\n    image(\\&quot;docs\\\/rmv_bgd:cool-car\\&quot;).transformation(\\n      new Transformation().resize(scale().width(0.2))\\n    )\\n  ).position(\\n    new Position()\\n      .gravity(compass(\\&quot;north\\&quot;))\\n      .offsetX(-150)\\n      .offsetY(200)\\n  )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/video\\\/upload\\\/l_docs:rmv_bgd:cool-car,c_scale,w_0.2\\\/fl_layer_apply,g_north,x_-150,y_200\\\/docs\\\/travel.mp4&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;video&quot;,&quot;transformation&quot;:[{&quot;overlay&quot;:&quot;docs:rmv_bgd:cool-car&quot;,&quot;crop_mode&quot;:&quot;scale&quot;,&quot;width&quot;:&quot;0.2&quot;},{&quot;flags&quot;:&quot;layer_apply&quot;,&quot;gravity&quot;:&quot;north&quot;,&quot;x&quot;:&quot;-150&quot;,&quot;y&quot;:&quot;200&quot;}],&quot;transformation_string&quot;:&quot;l_docs:rmv_bgd:cool-car,c_scale,w_0.2\\\/fl_layer_apply,g_north,x_-150,y_200&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:null,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;docs\\\/travel.mp4&quot;,&quot;extension&quot;:&quot;mp4&quot;,&quot;format&quot;:&quot;mp4&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;video&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><video\n      controls\n      muted\n      preload=\"none\"\n      class=\"c-transformed-asset c-transformed-asset--video\"\n      poster=\"https:\/\/res.cloudinary.com\/demo\/video\/upload\/l_docs:rmv_bgd:cool-car,c_scale,w_0.2\/fl_layer_apply,g_north,x_-150,y_200\/w_500\/docs\/travel.jpg\"\n      \n    >\n      <source src=\"https:\/\/res.cloudinary.com\/demo\/video\/upload\/l_docs:rmv_bgd:cool-car,c_scale,w_0.2\/fl_layer_apply,g_north,x_-150,y_200\/w_500\/vc_h265\/docs\/travel.mp4\" type=\"video\/mp4; codecs=hevc\">\n<source src=\"https:\/\/res.cloudinary.com\/demo\/video\/upload\/l_docs:rmv_bgd:cool-car,c_scale,w_0.2\/fl_layer_apply,g_north,x_-150,y_200\/w_500\/vc_vp9\/docs\/travel.webm\" type=\"video\/webm; codecs=vp9\">\n<source src=\"https:\/\/res.cloudinary.com\/demo\/video\/upload\/l_docs:rmv_bgd:cool-car,c_scale,w_0.2\/fl_layer_apply,g_north,x_-150,y_200\/w_500\/vc_auto\/docs\/travel.mp4\" type=\"video\/mp4\">\n<source src=\"https:\/\/res.cloudinary.com\/demo\/video\/upload\/l_docs:rmv_bgd:cool-car,c_scale,w_0.2\/fl_layer_apply,g_north,x_-150,y_200\/w_500\/vc_auto\/docs\/travel.webm\" type=\"video\/webm\">\n    <\/video><\/p>\n<p>\u201cWhere we\u2019re going, we don\u2019t need roads!\u201d but we definitely do need Cloudinary!<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>When displaying a set of product images, uniformity is key. Customers should be focusing on the product, not distracted by the background, especially if there are different backgrounds in each image. Therefore it makes sense to conduct product image background removal for any images that you want to group together. But have you ever noticed [&hellip;]<\/p>\n","protected":false},"author":51,"featured_media":27622,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[165],"class_list":["post-27350","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-image-transformation"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Use React to Remove Image Backgrounds in React (and More)<\/title>\n<meta name=\"description\" content=\"Learn product image background removal (or any image) and add a product image shadow in a React app with Cloudinary for free.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Remove Image Backgrounds and Add Realistic Shadows to Products in React\" \/>\n<meta property=\"og:description\" content=\"Learn product image background removal (or any image) and add a product image shadow in a React app with Cloudinary for free.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-29T15:29:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-06T23:57:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1100\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"carolinelevison\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react\"},\"author\":{\"name\":\"carolinelevison\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/3aa69a111d568040952bbae297d8c8fb\"},\"headline\":\"Remove Image Backgrounds and Add Realistic Shadows to Products in React\",\"datePublished\":\"2023-03-29T15:29:22+00:00\",\"dateModified\":\"2025-11-06T23:57:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react\"},\"wordCount\":284,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA\",\"keywords\":[\"Image Transformation\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2023\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react\",\"url\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react\",\"name\":\"Use React to Remove Image Backgrounds in React (and More)\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA\",\"datePublished\":\"2023-03-29T15:29:22+00:00\",\"dateModified\":\"2025-11-06T23:57:38+00:00\",\"description\":\"Learn product image background removal (or any image) and add a product image shadow in a React app with Cloudinary for free.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA\",\"width\":2000,\"height\":1100,\"caption\":\"Image showing a Porsche with code for adding product image shadow for the product image background removal and add product image shadow project with React and Cloudinary\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Remove Image Backgrounds and Add Realistic Shadows to Products in React\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/3aa69a111d568040952bbae297d8c8fb\",\"name\":\"carolinelevison\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/84ac4e7f81e08358ca4d375889c0a8ffff006b90ba8a469d27d206229f779912?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/84ac4e7f81e08358ca4d375889c0a8ffff006b90ba8a469d27d206229f779912?s=96&d=mm&r=g\",\"caption\":\"carolinelevison\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Use React to Remove Image Backgrounds in React (and More)","description":"Learn product image background removal (or any image) and add a product image shadow in a React app with Cloudinary for free.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react","og_locale":"en_US","og_type":"article","og_title":"Remove Image Backgrounds and Add Realistic Shadows to Products in React","og_description":"Learn product image background removal (or any image) and add a product image shadow in a React app with Cloudinary for free.","og_url":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react","og_site_name":"Cloudinary Blog","article_published_time":"2023-03-29T15:29:22+00:00","article_modified_time":"2025-11-06T23:57:38+00:00","og_image":[{"width":2000,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA","type":"image\/jpeg"}],"author":"carolinelevison","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react"},"author":{"name":"carolinelevison","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/3aa69a111d568040952bbae297d8c8fb"},"headline":"Remove Image Backgrounds and Add Realistic Shadows to Products in React","datePublished":"2023-03-29T15:29:22+00:00","dateModified":"2025-11-06T23:57:38+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react"},"wordCount":284,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA","keywords":["Image Transformation"],"inLanguage":"en-US","copyrightYear":"2023","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react","url":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react","name":"Use React to Remove Image Backgrounds in React (and More)","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA","datePublished":"2023-03-29T15:29:22+00:00","dateModified":"2025-11-06T23:57:38+00:00","description":"Learn product image background removal (or any image) and add a product image shadow in a React app with Cloudinary for free.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA","width":2000,"height":1100,"caption":"Image showing a Porsche with code for adding product image shadow for the product image background removal and add product image shadow project with React and Cloudinary"},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/remove-image-backgrounds-and-add-realistic-shadows-to-products-in-react#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Remove Image Backgrounds and Add Realistic Shadows to Products in React"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/3aa69a111d568040952bbae297d8c8fb","name":"carolinelevison","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/84ac4e7f81e08358ca4d375889c0a8ffff006b90ba8a469d27d206229f779912?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/84ac4e7f81e08358ca4d375889c0a8ffff006b90ba8a469d27d206229f779912?s=96&d=mm&r=g","caption":"carolinelevison"}}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1680047025\/blog-drop-shadow\/blog-drop-shadow.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/51"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=27350"}],"version-history":[{"count":153,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27350\/revisions"}],"predecessor-version":[{"id":39139,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27350\/revisions\/39139"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27622"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}