{"id":37211,"date":"2025-03-14T07:00:00","date_gmt":"2025-03-14T14:00:00","guid":{"rendered":"https:\/\/cloudinary.com\/blog\/?p=37211"},"modified":"2025-11-10T10:04:24","modified_gmt":"2025-11-10T18:04:24","slug":"transforming-images-on-upload-rails-active-storage","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage","title":{"rendered":"Transforming Images on Upload With Rails and Active Storage"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p><a href=\"https:\/\/rubyonrails.org\/\">Ruby on Rails<\/a> is well known for some of its powerful features like <a href=\"https:\/\/guides.rubyonrails.org\/active_record_basics.html\">Active Record<\/a> and <a href=\"https:\/\/guides.rubyonrails.org\/active_storage_overview.html\">Active Storage<\/a>. These two features work together by abstracting file uploads and storing them in your models. Active Record works with the popular cloud providers like Amazon S3 and Google Cloud Storage, but third-party adapters are also available. Cloudinary\u2019s <a href=\"https:\/\/cloudinary.com\/documentation\/rails_integration\">Ruby\/Rails SDK<\/a> includes an <a href=\"https:\/\/cloudinary.com\/documentation\/rails_activestorage\">Active Storage adapter<\/a> that you can configure so asset uploads in your Rails application are stored in <a href=\"https:\/\/cloudinary.com\/\">Cloudinary<\/a> instead of the local file system or one of the cloud providers.\nOne of the reasons that Rails is such a popular web framework is its simplicity. We\u2019ll look at how we can add uploads to a Rails app with some really simple configuration using the Cloudinary Active Record adapter. In this blog post, we\u2019ll combine the simplicity of our Active Storage uploads while applying some of Cloudinary\u2019s <a href=\"https:\/\/cloudinary.com\/documentation\/image_transformations\">image transformations<\/a> and optimizations to our uploads.<\/p>\n<h2>Configuring Cloudinary With Active Storage<\/h2>\n<p>Before applying transformations, you need to configure Active Storage to use Cloudinary as the service provider. In your <code>config\/storage.yml<\/code>, declare the Cloudinary service:<\/p>\n<pre class=\"js-syntax-highlighted\"><span><code class=\"hljs shcb-wrap-lines\">cloudinary:\n  service: Cloudinary\n<\/code><\/span><\/pre>\n<p>Then, tell Active Storage to use this configuration by adding the following to <code>config\/environments\/development.rb<\/code> (or the appropriate environment file):<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Use Cloudinary for Active Storage<\/span>\nconfig.active_storage.service = :cloudinary\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>If you haven\u2019t already set up Active Storage, be sure to run:<\/p>\n<pre class=\"js-syntax-highlighted\"><code>rails active_storage:install\nrails db:migrate\n<\/code><\/pre>\n<p>This will set up and create database migrations for active storage and migrate your database.<\/p>\n<h2>Direct Uploads With Active Storage<\/h2>\n<p>Once Cloudinary is configured as an Active Storage service, there are a couple of easy steps to get your file upload form ready to use.<\/p>\n<ol>\n<li>Include Active Storage\u2019s JavaScript:\n<pre class=\"js-syntax-highlighted\"><code>import { DirectUpload } from &quot;@rails\/activestorage&quot;\n<\/code><\/pre>\n<\/li>\n<li>Annotate your file input field in the Rails form:\n<pre class=\"js-syntax-highlighted\"><code>&lt;%= form.file_field :avatar, direct_upload: true %&gt;\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>It\u2019s incredible how easy it is to get from zero to uploading files from a web form to Cloudinary. A little bit of configuration and a couple of tiny snippets of code is all it takes!\nThis is great, but we\u2019re not taking full advantage of all that Cloudinary has to offer with this setup. We don\u2019t have a way to apply transformations, add-ons, or other customizations just yet.\nLet\u2019s move on to making this plug-and-play setup a little bit more flexible.<\/p>\n<h2>Create an Upload Preset<\/h2>\n<p>To apply transformations to our Active Storage direct upload, we will need to take advantage of <a href=\"https:\/\/cloudinary.com\/documentation\/upload_presets\">Cloudinary Upload Presets<\/a>. Upload presets allow you to define a set of options, <a href=\"https:\/\/cloudinary.com\/documentation\/cloudinary_add_ons\">add-ons<\/a>, and transformations to images uploaded using the preset.<\/p>\n<h3>Steps to Configure an Upload Preset:<\/h3>\n<ol>\n<li>Go to your <a href=\"https:\/\/cloudinary.com\/console\"><strong>Cloudinary Console<\/strong><\/a>.<\/li>\n<li>Navigate to <strong>Settings<\/strong> and open <strong>Upload.<\/strong>\n<\/li>\n<li>Click the <strong>Add Upload Preset<\/strong> button at the top right of the page.<\/li>\n<li>Create a new upload preset and define the transformations you need (i.e. enable add-ons, resize images, etc.)<\/li>\n<li>Save the upload preset\nOnce you have an Upload Preset configured with the transformations you want to have for your Active Storage uploads, there are two ways that it can be applied.<\/li>\n<\/ol>\n<h3>Apply the Upload Preset Globally<\/h3>\n<p>After you\u2019ve saved your new preset, you should be back on the upload presets page. Next to the <strong>Add Upload Preset<\/strong> button, there\u2019s a <strong>Manage Defaults<\/strong> button. Click it to configure the default presets.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/v1741896389\/blog-Transforming_Images_on_Upload_With_Rails_and_Active_Storage-1.png\" alt=\"upload preset screenshot\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"1634\" height=\"986\"\/><\/p>\n<p>We\u2019re able to apply a default preset for images, videos, and raw files for both the Cloudinary API and Media Library. The Cloudinary API includes SDKs like the Rails SDK, so this is the one we\u2019ll want to set.\nSelect your new preset under API\/Image and hit the save button.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/v1741896389\/blog-Transforming_Images_on_Upload_With_Rails_and_Active_Storage-2.png\" alt=\"new upload preset screenshot\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"1566\" height=\"942\"\/><\/p>\n<p>If you\u2019re OK with this preset being applied to every image uploaded through the Cloudinary API, this is an acceptable and easy approach.\nIf it\u2019s not, we\u2019ll see how we can set up our Active Storage direct upload to use the preset instead of setting it globally.<\/p>\n<h3>Configure a Preset Just for Active Storage<\/h3>\n<p>If you prefer not to have a global default (or need a different behavior for your Active Storage uploads), you can configure your Rails app to pass a specific upload preset via the <code>config\/storage.yml<\/code> file. This method allows you to tailor the upload parameters for Active Storage only:<\/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\">cloudinary:\n  service: Cloudinary\n  <span class=\"hljs-attr\">upload_preset<\/span>: <span class=\"hljs-string\">`active_storage_uploads`<\/span>\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>With this configuration, the Active Storage direct upload requests will automatically include your specified preset, ensuring that only images uploaded from your Rails application receive the transformations and options defined in <code>active_storage_uploads<\/code>.<\/p>\n<h2>Summary<\/h2>\n<p>Integrating Cloudinary with Rails and Active Storage is both straightforward and robust. With just a few configuration changes, you can set up direct uploads and use Cloudinary\u2019s image transformation capabilities. Apply a global upload preset or tailor a preset specifically for Active Storage uploads to achieve consistent, optimized images for your application.\nCombine Rails Active Storage and Cloudinary and get more granular control over your visual media assets.<\/p>\n<p><a href=\"https:\/\/cloudinary.com\/contact\">Contact us to learn more<\/a>.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":87,"featured_media":37212,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-37211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"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>Image Transformations and Optimizations Using Cloudinary and Ruby on Rails SDK<\/title>\n<meta name=\"description\" content=\"Read how to combine the simplicity of Active Storage uploads and apply Cloudinary\u2019s image transformations and optimizations to your uploads.\" \/>\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\/transforming-images-on-upload-rails-active-storage\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Transforming Images on Upload With Rails and Active Storage\" \/>\n<meta property=\"og:description\" content=\"Read how to combine the simplicity of Active Storage uploads and apply Cloudinary\u2019s image transformations and optimizations to your uploads.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-14T14:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-10T18:04:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.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=\"author\" content=\"melindapham\" \/>\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\/transforming-images-on-upload-rails-active-storage#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage\"},\"author\":{\"name\":\"melindapham\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9\"},\"headline\":\"Transforming Images on Upload With Rails and Active Storage\",\"datePublished\":\"2025-03-14T14:00:00+00:00\",\"dateModified\":\"2025-11-10T18:04:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage\"},\"wordCount\":9,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA\",\"inLanguage\":\"en-US\",\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage\",\"url\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage\",\"name\":\"Image Transformations and Optimizations Using Cloudinary and Ruby on Rails SDK\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA\",\"datePublished\":\"2025-03-14T14:00:00+00:00\",\"dateModified\":\"2025-11-10T18:04:24+00:00\",\"description\":\"Read how to combine the simplicity of Active Storage uploads and apply Cloudinary\u2019s image transformations and optimizations to your uploads.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA\",\"width\":2000,\"height\":1100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Transforming Images on Upload With Rails and Active Storage\"}]},{\"@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\/0d5ad601e4c3b5be89245dfb14be42d9\",\"name\":\"melindapham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g\",\"caption\":\"melindapham\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Image Transformations and Optimizations Using Cloudinary and Ruby on Rails SDK","description":"Read how to combine the simplicity of Active Storage uploads and apply Cloudinary\u2019s image transformations and optimizations to your uploads.","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\/transforming-images-on-upload-rails-active-storage","og_locale":"en_US","og_type":"article","og_title":"Transforming Images on Upload With Rails and Active Storage","og_description":"Read how to combine the simplicity of Active Storage uploads and apply Cloudinary\u2019s image transformations and optimizations to your uploads.","og_url":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage","og_site_name":"Cloudinary Blog","article_published_time":"2025-03-14T14:00:00+00:00","article_modified_time":"2025-11-10T18:04:24+00:00","og_image":[{"width":2000,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA","type":"image\/png"}],"author":"melindapham","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage"},"author":{"name":"melindapham","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9"},"headline":"Transforming Images on Upload With Rails and Active Storage","datePublished":"2025-03-14T14:00:00+00:00","dateModified":"2025-11-10T18:04:24+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage"},"wordCount":9,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA","inLanguage":"en-US","copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage","url":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage","name":"Image Transformations and Optimizations Using Cloudinary and Ruby on Rails SDK","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA","datePublished":"2025-03-14T14:00:00+00:00","dateModified":"2025-11-10T18:04:24+00:00","description":"Read how to combine the simplicity of Active Storage uploads and apply Cloudinary\u2019s image transformations and optimizations to your uploads.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA","width":2000,"height":1100},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/transforming-images-on-upload-rails-active-storage#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Transforming Images on Upload With Rails and Active Storage"}]},{"@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\/0d5ad601e4c3b5be89245dfb14be42d9","name":"melindapham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g","caption":"melindapham"}}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1741633800\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage\/Blog_Transforming_images_on_upload_with_Rails_and_Active_Storage.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/37211","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\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=37211"}],"version-history":[{"count":3,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/37211\/revisions"}],"predecessor-version":[{"id":39238,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/37211\/revisions\/39238"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/37212"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=37211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=37211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=37211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}