{"id":77461,"date":"2017-11-14T03:32:14","date_gmt":"2017-11-14T03:32:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/auto-cloudinary\/"},"modified":"2025-09-19T11:42:12","modified_gmt":"2025-09-19T11:42:12","slug":"auto-cloudinary","status":"publish","type":"plugin","link":"https:\/\/kir.wordpress.org\/plugins\/auto-cloudinary\/","author":10345926,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.1","stable_tag":"1.3.1","tested":"6.8.5","requires":"4.4","requires_php":"5.6","requires_plugins":null,"header_name":"Auto Cloudinary","header_author":"Junaid Bhura","header_description":"Super simple Cloudinary auto-upload implementation for WordPress.","assets_banners_color":"0071ba","last_updated":"2025-09-19 11:42:12","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/junaid.dev","rating":4.4,"author_block_rating":0,"active_installs":200,"downloads":32651,"num_ratings":14,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"junaidbhura","date":"2017-11-14 04:39:11"},"1.0.1":{"tag":"1.0.1","author":"junaidbhura","date":"2017-11-14 05:18:24"},"1.0.2":{"tag":"1.0.2","author":"junaidbhura","date":"2018-03-05 07:19:19"},"1.0.3":{"tag":"1.0.3","author":"junaidbhura","date":"2018-06-03 08:23:45"},"1.1.0":{"tag":"1.1.0","author":"junaidbhura","date":"2018-10-26 11:21:44"},"1.1.1":{"tag":"1.1.1","author":"junaidbhura","date":"2019-05-06 03:42:39"},"1.2.0":{"tag":"1.2.0","author":"junaidbhura","date":"2019-05-24 23:27:55"},"1.2.1":{"tag":"1.2.1","author":"junaidbhura","date":"2019-11-10 21:54:16"},"1.2.2":{"tag":"1.2.2","author":"junaidbhura","date":"2019-11-22 11:34:31"},"1.2.3":{"tag":"1.2.3","author":"junaidbhura","date":"2021-03-09 07:30:15"},"1.3.0":{"tag":"1.3.0","author":"junaidbhura","date":"2023-08-12 08:27:11"},"1.3.1":{"tag":"1.3.1","author":"junaidbhura","date":"2025-09-19 11:42:12"}},"upgrade_notice":[],"ratings":{"1":2,"2":0,"3":0,"4":1,"5":11},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":1765596,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":1765596,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":1765596,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":1765596,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":1765596,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2","1.0.3","1.1.0","1.1.1","1.2.0","1.2.1","1.2.2","1.2.3","1.3.0","1.3.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3364509,"resolution":"1","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3364509,"resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3364509,"resolution":"3","location":"plugin"}},"screenshots":{"1":"WordPress Options","2":"Cloudinary Cloud Name","3":"Cloudinary Auto Upload Setup"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3863,130902,49350,125377,29161],"plugin_category":[59],"plugin_contributors":[85440],"plugin_business_model":[],"class_list":["post-77461","plugin","type-plugin","status-publish","hentry","plugin_tags-cdn","plugin_tags-cloudinary","plugin_tags-dynamic-images","plugin_tags-image-manipulation","plugin_tags-image-optimization","plugin_category-utilities-and-tools","plugin_contributors-junaidbhura","plugin_committers-junaidbhura"],"banners":{"banner":"https:\/\/ps.w.org\/auto-cloudinary\/assets\/banner-772x250.png?rev=1765596","banner_2x":"https:\/\/ps.w.org\/auto-cloudinary\/assets\/banner-1544x500.png?rev=1765596","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/auto-cloudinary\/assets\/icon.svg?rev=1765596","icon":"https:\/\/ps.w.org\/auto-cloudinary\/assets\/icon.svg?rev=1765596","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/auto-cloudinary\/trunk\/screenshot-1.png?rev=3364509","caption":"WordPress Options"},{"src":"https:\/\/ps.w.org\/auto-cloudinary\/trunk\/screenshot-2.png?rev=3364509","caption":"Cloudinary Cloud Name"},{"src":"https:\/\/ps.w.org\/auto-cloudinary\/trunk\/screenshot-3.png?rev=3364509","caption":"Cloudinary Auto Upload Setup"}],"raw_content":"<!--section=description-->\n<p><a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\">Check out the Github Repository \u2665<\/a><\/p>\n\n<p>This plugin provides a <strong>super simple<\/strong> <a href=\"https:\/\/cloudinary.com\/documentation\/fetch_remote_images#auto_upload_remote_resources\">Cloudinary auto-upload<\/a> implementation for WordPress.<\/p>\n\n<p>It is inspired by <a href=\"https:\/\/developer.wordpress.com\/docs\/photon\/\">Photon<\/a> and <a href=\"https:\/\/github.com\/humanmade\/tachyon-plugin\">Tachyon<\/a>.<\/p>\n\n<p>Cloudinary will <strong>automatically fetch and serve the images<\/strong> from your media library like a <strong>CDN<\/strong>, without you having to worry about the complicated upload API! Just <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/wiki\/Setup\">set up auto-upload<\/a> in your Cloudinary settings, enter the details in the plugin's options, and you're all set!<\/p>\n\n<p>Easy peasy \ud83d\ude0e<\/p>\n\n<h3>Important<\/h3>\n\n<p>This plugin is <strong>incompatible with the official Cloudinary plugin<\/strong>. You'd need to disable that plugin before using this one.<\/p>\n\n<h3>Quick Links<\/h3>\n\n<p><a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/wiki\/Setup\">Setup<\/a> | <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\">Issues<\/a> | <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/wiki\/Functions\">Functions<\/a> | <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/wiki\/Filters\">Filters<\/a> | <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/wiki\/Best-Practices\">Best Practices<\/a><\/p>\n\n<h3>Why did you build this plugin?<\/h3>\n\n<p>There already is an <strong>official Cloudinary plugin<\/strong> available. But in my opinion, it's a bit of an overkill and takes over the admin UI. This plugin aims to be:<\/p>\n\n<ul>\n<li><strong>Super simple<\/strong> and light-weight<\/li>\n<li>Totally seamless and <strong>out of the way<\/strong><\/li>\n<li>A flexible tool for <strong>WordPress developers<\/strong><\/li>\n<\/ul>\n\n<h3>What is Cloudinary Auto-Upload?<\/h3>\n\n<p>Cloudinary gives you two options to upload files to it's servers:<\/p>\n\n<ol>\n<li>The complicated <strong>Upload API<\/strong> \ud83d\ude31<\/li>\n<li>The super easy and magical <strong>Fetch API<\/strong> \ud83c\udfa9<\/li>\n<\/ol>\n\n<h4>Upload API<\/h4>\n\n<p><em>TL;DR: Too complicated and in the way<\/em> \ud83d\udc4e<\/p>\n\n<p>Cloudinary gives you an API, using which, you can manually upload the images to Cloudinary. So you'd need an <strong>API key<\/strong>, etc. The <strong>official plugin<\/strong> uses this method. When you upload an image to the media library, it in turn, uploads it to Cloudinary. This could be a problem if you have thousands of <strong>existing images<\/strong>, and might not be flexible enough to support <strong>custom architecture<\/strong>.<\/p>\n\n<h4>Fetch API<\/h4>\n\n<p><em>TL;DR: Magical<\/em> \ud83d\udc4d<\/p>\n\n<p>This plugin uses the super easy <strong>Auto-Upload<\/strong> feature in the <strong>Fetch API<\/strong>. We just tell Cloudinary where to find the files on our server (or on S3 or anywhere on the Internet), and it <strong>automatically downloads<\/strong> it from there and saves it on to it's servers the <strong>first time you ask for it<\/strong>, like a CDN would!<\/p>\n\n<h3>What does this plugin do?<\/h3>\n\n<p>This plugin does two main things:<\/p>\n\n<ol>\n<li>Provides a simple function <code>cloudinary_url()<\/code> to get a Cloudinary auto-upload URL for any image in your media library, with all the Cloudinary transformations, so you can <strong>dynamically manipulate an image on the fly<\/strong>.<\/li>\n<li>Attempts to automatically convert all image URLs on the front-end into a Cloudinary auto-upload URL, so you can <strong>use Cloudinary as an image CDN<\/strong>.<\/li>\n<\/ol>\n\n<h3>The magical function \ud83c\udfa9<\/h3>\n\n<p><strong><code>cloudinary_url( $identifier, $args )<\/code><\/strong><\/p>\n\n<p>This function returns a Cloudinary Auto Upload URL for an image. Please read the <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/wiki\/Best-Practices\">Best Practices<\/a> page before using this.<\/p>\n\n<h4>Parameters<\/h4>\n\n<ul>\n<li><strong>identifier<\/strong> (integer\/string)(required) : Either the ID of the attachment, or a full image URL.<\/li>\n<li><strong>args<\/strong> (array)(optional) : Arguments to manipulate the image.<\/li>\n<\/ul>\n\n<h4>Return Value<\/h4>\n\n<p>Returns a URL (string):<\/p>\n\n<pre><code>'https:\/\/res.cloudinary.com\/cloud-name\/auto-mapping-folder\/2017\/12\/your-image.jpg'\n<\/code><\/pre>\n\n<h4>Arguments<\/h4>\n\n<p>You can optionally send an array of arguments which can transform the image, and set a dynamic file name. Ex:<\/p>\n\n<pre><code>array(\n    'transform' =&gt; array( \/\/ Optional. All transformations go here.\n        'width'   =&gt; 300,\n        'height'  =&gt; 200,\n        'crop'    =&gt; 'fill',\n        'quality' =&gt; '80',\n        'gravity' =&gt; 'face',\n    ),\n    'file_name' =&gt; 'whatever-file-name-you-want', \/\/ Optional. If you want to use a dynamic file name for SEO. Don't use the file extension!\n);\n<\/code><\/pre>\n\n<p>Here's a <a href=\"https:\/\/cloudinary.com\/documentation\/image_transformations\">full list of transformations<\/a> you can achieve with Cloudinary.<\/p>\n\n<h3>Examples<\/h3>\n\n<pre><code>&lt;?php\n$url_1 = cloudinary_url( 123, array(\n    'transform' =&gt; array(\n        'width'   =&gt; 300,\n        'height'  =&gt; 200,\n        'crop'    =&gt; 'fill',\n        'quality' =&gt; '80',\n        'gravity' =&gt; 'face',\n    ),\n    'file_name' =&gt; 'dynamic-file-name',\n) );\n\n$url_2 = cloudinary_url( 'https:\/\/www.yourwebsite.com\/wp-content\/uploads\/2017\/12\/my-image.jpg', array(\n    'transform' =&gt; array(\n        'width'   =&gt; 100,\n        'height'  =&gt; 100,\n    ),\n) );\n\n\/\/ $url_1 : https:\/\/res.cloudinary.com\/cloud-name\/images\/w_300,h_200,c_fill,q_80,g_face\/auto-mapping-folder\/2017\/12\/my-image\/dynamic-file-name.jpg\n\/\/ $url_2 : https:\/\/res.cloudinary.com\/cloud-name\/w_100,h_100\/auto-mapping-folder\/2017\/12\/my-image.jpg\n?&gt;\n\n&lt;img src=\"&lt;?php echo esc_url( $url_1 ); ?&gt;\" width=\"300\" height=\"200\" alt=\"\"&gt;\n&lt;img src=\"&lt;?php echo esc_url( $url_2 ); ?&gt;\" width=\"100\" height=\"100\" alt=\"\"&gt;\n<\/code><\/pre>\n\n<!--section=installation-->\n<p>Upload 'auto-cloudinary' to the '\/wp-content\/plugins\/' directory.<\/p>\n\n<p>Activate the plugin through the 'Plugins' menu in WordPress.<\/p>\n\n<!--section=changelog-->\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Better handling of soft crops <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/41\">#41<\/a><\/li>\n<\/ul>\n\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>Fixed missing admin settings page <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/32\">#32<\/a><\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Re-opened and fixed \"Fix images sizes in block editor\" <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/25\">#25<\/a><\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Fix images sizes in block editor <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/25\">#25<\/a><\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Turn off Cloudinary URLs for REST API calls <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/18\">#18<\/a><\/li>\n<li>Added progressive image loading parameter <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/20\">#20<\/a><\/li>\n<li>Full release details: <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/releases\/tag\/1.2.0\">https:\/\/github.com\/junaidbhura\/auto-cloudinary\/releases\/tag\/1.2.0<\/a><\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Better AJAX support <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/13\">#13<\/a><\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added default crop options to the WP Admin <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/10\">#10<\/a><\/li>\n<li>Full release details: <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/releases\/tag\/1.1.0\">https:\/\/github.com\/junaidbhura\/auto-cloudinary\/releases\/tag\/1.1.0<\/a><\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>New filters for default hard and soft crops <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/2\">#2<\/a>. Props <a href=\"https:\/\/github.com\/petersplugins\">@petersplugins<\/a><\/li>\n<li>Performance improvements<\/li>\n<li>Full release details: <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/releases\/tag\/1.0.3\">https:\/\/github.com\/junaidbhura\/auto-cloudinary\/releases\/tag\/1.0.3<\/a><\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Remove empty width and height from URL <a href=\"https:\/\/github.com\/junaidbhura\/auto-cloudinary\/issues\/1\">#1<\/a><\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Add default crop to replaced content images.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First stable release.<\/li>\n<\/ul>","raw_excerpt":"Super simple Cloudinary auto-upload implementation for WordPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/77461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=77461"}],"author":[{"embeddable":true,"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/junaidbhura"}],"wp:attachment":[{"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=77461"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=77461"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=77461"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=77461"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=77461"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/kir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=77461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}