{"id":23662,"date":"2022-04-27T07:30:00","date_gmt":"2022-04-27T14:30:00","guid":{"rendered":"https:\/\/cloudinary.com\/blog\/?p=23662"},"modified":"2024-06-06T12:55:11","modified_gmt":"2024-06-06T19:55:11","slug":"product-customization-with-cloudinary","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary","title":{"rendered":"Product Customization With Cloudinary"},"content":{"rendered":"\n<p>In today\u2019s highly visual world, a key task of building websites is the addition of media, such as images and videos. You can do that in several effective ways, one of which is with Cloudinary\u2019s capabilities for <a href=\"https:\/\/cloudinary.com\/solutions\/customization\">product customization<\/a>.\u00a0<\/p>\n\n\n\n<p>By way of background, <a href=\"https:\/\/cloudinary.com\/products\/programmable_media\">Cloudinary<\/a> is a software-as-a-service (SaaS) platform through which you can efficiently and easily deliver media\u2014images, text, audio, video\u2014across devices and browsers. Additionally, by using Cloudinary\u2019s API, you can customize, manage, and organize content\u2014a task made flexible by the API\u2019s many options. Also, a big help to developers are server- and client-side <a href=\"https:\/\/cloudinary.com\/documentation\/cloudinary_sdks\">Cloudinary SDKs<\/a> for Ruby on Rails, Python, Go, Node.js, JQuery, Vue.js, Android, Kotlin, and such.<br><br>This tutorial steps you through the procedure for integrating several <a href=\"https:\/\/github.com\/cloudinary\/product-customization-sample-app\">product-customization<\/a> features from Cloudinary into an <a href=\"https:\/\/cloudinary.com\/guides\/e-commerce-platform\/select-the-right-e-commerce-platform-for-your-needs\">e-commerce store<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installation and Setup<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/cloudinary.com\/users\/register\/free\">Sign up<\/a> for free at Cloudinary.<br><br>Afterwards, take a few moments to familiarize yourself with Cloudinary\u2019s intuitive dashboard. Copy and save the <code>cloud_name<\/code>, <code>api_key<\/code>, and <code>api_secret<\/code> variables for use in a later step.<\/li>\n\n\n\n<li>Install and configure an SDK, say, the one for Python:\n<ol class=\"wp-block-list\">\n<li>Type this terminal command<br><code>pip install cloudinary<\/code><\/li>\n\n\n\n<li>Set the global configurations:<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">cloudinary.config( \n  cloud_name = <span class=\"hljs-string\">\"sample\"<\/span>, \n  api_key = <span class=\"hljs-string\">\"874837483274837\"<\/span>, \n  api_secret = <span class=\"hljs-string\">\"a676b67565c6767a6767d6767f676fe1\"<\/span>,\n  secure = <span class=\"hljs-literal\">true<\/span>\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\n\n<h2 class=\"wp-block-heading\">Asset Upload<\/h2>\n\n\n\n<p>Next, upload an image to the cloud. Say, you want to customize a T-shirt. You can do that with your own image of the T-shirt or with this one from Cloudinary&#8217;s <a href=\"https:\/\/github.com\/cloudinary\/product-customization-sample-app\">sample app for product customization<\/a>. Do the following:<\/p>\n\n\n\n<p> 1. Name the picture of the T-shirt <code>shirt.png<\/code>, upload it to Cloudinary, and save it in your home directory with the code below.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">cloudinary.uploader.upload(<span class=\"hljs-string\">\"\/home\/shirt.png\"<\/span>, \n  folder = <span class=\"hljs-string\">\"myfolder\/mysubfolder\/\"<\/span>, \n  public_id = <span class=\"hljs-string\">\"my_name\"<\/span>,\n  tags = &#91;<span class=\"hljs-string\">\"shirt\"<\/span>]) <\/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\n\n<p>Your asset <code>shirt.png<\/code> is now automatically available. Note the two parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>folder<\/code><strong>:<\/strong> Your e-commerce store must contain folders for your merchandise, e.g., shirts and cups. This parameter enables you to create folders for storing product images.<\/li>\n\n\n\n<li><code>public_id<\/code><strong>:<\/strong> This parameter facilitates search engine optimization (SEO) for your delivery URL.<\/li>\n\n\n\n<li><code>tags<\/code>: This parameter categorizes the image, this will be used later by the product gallery widget.<\/li>\n<\/ul>\n\n\n\n<p> 2. Add your assets from secondary sources like Google Cloud and S3.<\/p>\n\n\n\n<p>For Google Cloud, type:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">cloudinary.uploader.upload(<span class=\"hljs-string\">\"gs:\/\/my_samples\/sample.jpg\"<\/span>)<\/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\n\n<p>For S3, type:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">cloudinary.uploader.upload(<span class=\"hljs-string\">\"s3:\/\/my-bucket\/my-path\/example.jpg\"<\/span>)<\/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\n\n<p>Repeat the above steps to add as many images as you desire.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Asset Transformation<\/h2>\n\n\n\n<p>Cloudinary offers several transformation options. For this tutorial, add a three-pixel-wide border in black and a transparent overlay-watermark, which prevents third-party downloads for security. Here\u2019s the code:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">CloudinaryImage(<span class=\"hljs-string\">\"sample_woman.png\"<\/span>).image(transformation=&#91;\n   {<span class=\"hljs-string\">'border'<\/span>: <span class=\"hljs-string\">\"3px_solid_black\"<\/span>, <span class=\"hljs-string\">'radius'<\/span>: <span class=\"hljs-number\">20<\/span>},\n  {<span class=\"hljs-string\">'overlay'<\/span>: <span class=\"hljs-string\">\"business_icon\"<\/span>},\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\n\n<h2 class=\"wp-block-heading\">Integration Into Cloudinary\u2019s Product Gallery<\/h2>\n\n\n\n<p>First, perform these three steps:<\/p>\n\n\n\n<p> 1. Enable the list of client assets: on your console, click <strong>Settings<\/strong> &gt; <strong>Security<\/strong> and, under <strong>Restricted media types<\/strong>, uncheck <strong>Resource list<\/strong>.<\/p>\n\n\n\n<p> 2. Add the<code> <a href=\"https:\/\/product-gallery.cloudinary.com\/all.js\">all.js<\/a><\/code> file, which contains Cloudinary\u2019s product-customization functions, with this code:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/product-gallery.cloudinary.com\/all.js\"<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"text\/javascript\"<\/span>&gt;<\/span>  \n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><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\n\n<p> 3. Go to the merchandise page on which to render the Product Gallery widget and assign it a special ID, e.g., <code>my-gallery<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"my-gallery\"<\/span> <span class=\"hljs-attr\">style<\/span>=<span class=\"hljs-string\">\"max-width:80%\"<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><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\n\n<p>Next, initialize the Product Gallery widget by editing the JavaScript file that accompanied the installation. That file initiates the Cloudinary class and grants you access to the <code>cloudinary.galleryWidget<\/code> (options) method, which then creates an instance in the memory.&nbsp;<\/p>\n\n\n\n<p>Specify these three parameters in the JavaScript file:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The cloud name of your Cloudinary account<\/li>\n\n\n\n<li><code>container<\/code>, which is an element on the page for the widget<\/li>\n\n\n\n<li><code>mediaAsset<\/code>, which contains all the media as an array of assets<\/li>\n<\/ul>\n\n\n\n<p>Do the following:<\/p>\n\n\n\n<p> 1. Create a widget for all the images with the <code>shirt<\/code> tag:<\/p>\n\n\n<pre class=\"wp-block-code\" 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\">const<\/span> myGallery = cloudinary.galleryWidget({ \n  <span class=\"hljs-attr\">container<\/span>: <span class=\"hljs-string\">\"#my-gallery\"<\/span>, \n  <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-string\">\"demo\"<\/span>, \n  <span class=\"hljs-attr\">mediaAssets<\/span>: &#91;{ <span class=\"hljs-attr\">tag<\/span>: <span class=\"hljs-string\">\"shirt\"<\/span> }]    <span class=\"hljs-comment\">\/\/ by default mediaType: \"image\"<\/span>\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\n\n<p> 2. Render the widget of the Product Gallery with <code>galleryWidget<\/code>,<strong> <\/strong>which creates a widget but does not render it until the<strong> <\/strong><code>render<\/code> method is called:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">code<\/span>&gt;<\/span>myGallery.render();<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">code<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><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\n<div class=\"wp-block-cloudinary-markdown \"><\/div>\n\n\n<p>Your setup is now complete. The subsections below describe the features you can add to your e-commerce store.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Display Your T-Shirt<\/h3>\n\n\n\n<p>The code below sets up an Amazon-like display, complete with an expansion mode, a spin mechanism, and so forth.<\/p>\n\n\n<pre class=\"wp-block-code\" 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\">var<\/span> myGallery= cloudinary.galleryWidget({\n  <span class=\"hljs-attr\">container<\/span>: <span class=\"hljs-string\">\"#my-gallery\"<\/span>,\n  <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-string\">\"demo\"<\/span>,\n  <span class=\"hljs-attr\">displayProps<\/span>: {\n    <span class=\"hljs-attr\">mode<\/span>: <span class=\"hljs-string\">\"expanded\"<\/span>,\n    <span class=\"hljs-attr\">topOffset<\/span>: <span class=\"hljs-number\">70<\/span> <span class=\"hljs-comment\">\/\/ to account for the menu element at the top of this documentation page<\/span>\n  },\n  <span class=\"hljs-attr\">aspectRatio<\/span>: <span class=\"hljs-string\">\"4:3\"<\/span>, <span class=\"hljs-comment\">\/\/ most of the assets are in landscape orientation<\/span>\n  <span class=\"hljs-attr\">mediaAssets<\/span>: &#91;\n    {<span class=\"hljs-attr\">tag<\/span>: <span class=\"hljs-string\">\"shirt\"<\/span>}, <span class=\"hljs-comment\">\/\/ by default mediaType: \"image\"<\/span>\n    {<span class=\"hljs-attr\">tag<\/span>: <span class=\"hljs-string\">\"shirt\"<\/span>, <span class=\"hljs-attr\">mediaType<\/span>: <span class=\"hljs-string\">\"video\"<\/span>}, \n    {<span class=\"hljs-attr\">tag<\/span>: <span class=\"hljs-string\">\"shirt\"<\/span>, <span class=\"hljs-attr\">mediaType<\/span>: <span class=\"hljs-string\">\"spin\"<\/span>}\n  ]\n});\nmyGallery.render();<\/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\n<div class=\"wp-block-cloudinary-markdown \"><\/div>\n\n\n<h3 class=\"wp-block-heading\">Add a User-Friendly Touch<\/h3>\n\n\n\n<p>Add a carousel that displays the number of assets with the code below, which leverages a thumbnail method:<\/p>\n\n\n<pre class=\"wp-block-code\" 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\">var<\/span> myGallery = cloudinary.galleryWidget({ \n  <span class=\"hljs-attr\">container<\/span>: <span class=\"hljs-string\">\"#my-gallery\"<\/span>, \n  <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-string\">\"demo\"<\/span>, \n  <span class=\"hljs-attr\">carouselStyle<\/span>: <span class=\"hljs-string\">\"thumbnails\"<\/span>,   <span class=\"hljs-comment\">\/\/ default value: included for clarity<\/span>\n  <span class=\"hljs-attr\">thumbnailProps<\/span>: { <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">75<\/span>, <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">75<\/span>, <span class=\"hljs-attr\">spacing<\/span>: <span class=\"hljs-number\">4<\/span>, <span class=\"hljs-attr\">navigationColor<\/span>: <span class=\"hljs-string\">\"green\"<\/span>},\n  <span class=\"hljs-attr\">mediaAssets<\/span>: &#91;{ <span class=\"hljs-attr\">tag<\/span>: <span class=\"hljs-string\">\"shirt\"<\/span> }] });\nmyGallery.render();<\/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\n<div class=\"wp-block-cloudinary-markdown \"><\/div>\n\n\n<h3 class=\"wp-block-heading\">Track Visitor Behavior<\/h3>\n\n\n\n<p>To track visitor behavior for analytical purposes, initialize the `myGallery` widget to record where your visitors click, like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">myGallery.on(<span class=\"hljs-string\">'mouseenter'<\/span>, (data) =&gt; {\n  <span class=\"hljs-built_in\">console<\/span>.log(<span class=\"hljs-string\">'MouseEnter'<\/span>, data);\n});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><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\n<div class=\"wp-block-cloudinary-markdown \"><\/div>\n\n\n<h3 class=\"wp-block-heading\">Accommodate Accessibility<\/h3>\n\n\n\n<p>The accessibility-text feature helps with screen reading and enhances SEO.&nbsp;<\/p>\n\n\n\n<p>Configure the text with the <code>AcessibilityProps<\/code> object. By default, the Product Gallery throws the string <code>Gallery assets n of m<\/code>. Optionally, you can make the gallery take the string from an asset\u2019s contextual or structured metadata field.<\/p>\n\n\n\n<p><code>AccessibilityProps<\/code> takes two parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>mediaAltSource<\/code>, which is the source of the text string for each of the media assets in the gallery. You can specify one of these three source values:\n<ul class=\"wp-block-list\">\n<li><code>contextual<\/code>, which uses the key-value pair of a contextual metadata field for each asset, as specified by the key passed in the <code>mediaAltId<\/code> parameter.<\/li>\n\n\n\n<li><code>metadata<\/code>, which uses the value of a structured metadata field for each asset, as specified by <code>external_id<\/code>, which is passed in the <code>mediaAltId<\/code> parameter.<\/li>\n\n\n\n<li><code>auto<\/code>, which is the default that determines the order of the asset within the gallery according to the template <code>Gallery asset n of m<\/code>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>mediaAltId<\/code>, which sets the source value of <code>mediaAltSource<\/code>, as described above.<\/li>\n<\/ul>\n\n\n\n<p>Here\u2019s a code sample:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">var<\/span> myGallery = cloudinary.galleryWidget({\n  <span class=\"hljs-attr\">container<\/span>: <span class=\"hljs-string\">\"#my-gallery\"<\/span>,\n  <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-string\">\"demo\"<\/span>,\n  <span class=\"hljs-attr\">mediaAssets<\/span>: &#91;{ <span class=\"hljs-attr\">tag<\/span>: <span class=\"hljs-string\">\"shoes\"<\/span> }],\n  <span class=\"hljs-attr\">accessibilityProps<\/span>: {\n    <span class=\"hljs-attr\">mediaAltSource<\/span>: <span class=\"hljs-string\">\"metadata\"<\/span>, \n    <span class=\"hljs-attr\">mediaAltId<\/span>: <span class=\"hljs-string\">\"alt_id\"<\/span>\n  }\n});\nmyGallery.render();<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><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\n<div class=\"wp-block-cloudinary-markdown \"><\/div>\n\n\n<h2 class=\"wp-block-heading\">Other Tips<\/h2>\n\n\n\n<p>Keep in mind these three tips:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Specifying the <a href=\"https:\/\/cloudinary.com\/documentation\/resizing_and_cropping\"><code>fill<\/code> cropping mode<\/a> and setting the correct aspect ratio can significantly improve the display quality of assets.<\/li>\n\n\n\n<li>The Product Gallery widget displays only those media assets that were uploaded to Cloudinary with the <code>delivery type<\/code> method.<\/li>\n\n\n\n<li>Be mindful of any required configurations when starting the Product Gallery widget.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">The Cloudinary Media Experience Platform<\/h2>\n\n\n\n<p>Ready to scale your business? Build your next site with the expert help of Cloudinary. Besides those described in this tutorial, Cloudinary offers numerous features that help set e-commerce up for success. For details, see the platform\u2019s <a href=\"https:\/\/cloudinary.com\/documentation\">comprehensive documentation<\/a> and give our <a href=\"https:\/\/github.com\/cloudinary\/product-customization-sample-app\">product customization sample app<\/a> a try!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s highly visual world, a key task of building websites is the addition of media, such as images and videos. You can do that in several effective ways, one of which is with Cloudinary\u2019s capabilities for product customization.\u00a0 By way of background, Cloudinary is a software-as-a-service (SaaS) platform through which you can efficiently and [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":23663,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[25,165,361],"class_list":["post-23662","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-asset-management","tag-image-transformation","tag-product-customization"],"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>Product Customization With Cloudinary<\/title>\n<meta name=\"description\" content=\"How to incorporate Cloudinary&#039;s product-customization features, including the Product Gallery, into e-commerce sites, and reap numerous benefits.\" \/>\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\/product-customization-with-cloudinary\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Product Customization With Cloudinary\" \/>\n<meta property=\"og:description\" content=\"How to incorporate Cloudinary&#039;s product-customization features, including the Product Gallery, into e-commerce sites, and reap numerous benefits.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-27T14:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-06T19:55:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1648682818\/Product-Customization\/Product-Customization-png?_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\/png\" \/>\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\/product-customization-with-cloudinary#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Product Customization With Cloudinary\",\"datePublished\":\"2022-04-27T14:30:00+00:00\",\"dateModified\":\"2024-06-06T19:55:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary\"},\"wordCount\":891,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA\",\"keywords\":[\"Asset Management\",\"Image Transformation\",\"Product Customization\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary\",\"url\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary\",\"name\":\"Product Customization With Cloudinary\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA\",\"datePublished\":\"2022-04-27T14:30:00+00:00\",\"dateModified\":\"2024-06-06T19:55:11+00:00\",\"description\":\"How to incorporate Cloudinary's product-customization features, including the Product Gallery, into e-commerce sites, and reap numerous benefits.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA\",\"width\":2000,\"height\":1100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Product Customization With Cloudinary\"}]},{\"@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\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Product Customization With Cloudinary","description":"How to incorporate Cloudinary's product-customization features, including the Product Gallery, into e-commerce sites, and reap numerous benefits.","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\/product-customization-with-cloudinary","og_locale":"en_US","og_type":"article","og_title":"Product Customization With Cloudinary","og_description":"How to incorporate Cloudinary's product-customization features, including the Product Gallery, into e-commerce sites, and reap numerous benefits.","og_url":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary","og_site_name":"Cloudinary Blog","article_published_time":"2022-04-27T14:30:00+00:00","article_modified_time":"2024-06-06T19:55:11+00:00","og_image":[{"width":2000,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1648682818\/Product-Customization\/Product-Customization-png?_i=AA","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary"},"author":{"name":"","@id":""},"headline":"Product Customization With Cloudinary","datePublished":"2022-04-27T14:30:00+00:00","dateModified":"2024-06-06T19:55:11+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary"},"wordCount":891,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA","keywords":["Asset Management","Image Transformation","Product Customization"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary","url":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary","name":"Product Customization With Cloudinary","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA","datePublished":"2022-04-27T14:30:00+00:00","dateModified":"2024-06-06T19:55:11+00:00","description":"How to incorporate Cloudinary's product-customization features, including the Product Gallery, into e-commerce sites, and reap numerous benefits.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA","width":2000,"height":1100},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/product-customization-with-cloudinary#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Product Customization With Cloudinary"}]},{"@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":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1648682818\/Product-Customization\/Product-Customization.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/23662","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\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=23662"}],"version-history":[{"count":38,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/23662\/revisions"}],"predecessor-version":[{"id":34482,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/23662\/revisions\/34482"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/23663"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=23662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=23662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=23662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}