{"id":13786989,"url":"https://github.com/bridgetownrb/bridgetown-cloudinary","last_synced_at":"2026-02-27T03:33:59.860Z","repository":{"id":59151677,"uuid":"265009575","full_name":"bridgetownrb/bridgetown-cloudinary","owner":"bridgetownrb","description":"Embed or access images with transformations using Cloudinary and Bridgetown","archived":false,"fork":false,"pushed_at":"2023-05-15T20:48:48.000Z","size":50,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T13:13:23.551Z","etag":null,"topics":["bridgetown","bridgetown-plugin","cloudinary","image-manipulation","image-transformations"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bridgetownrb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-18T17:18:26.000Z","updated_at":"2025-03-09T21:55:50.000Z","dependencies_parsed_at":"2024-01-18T23:10:53.832Z","dependency_job_id":"9ded4f05-eef5-49d7-81aa-db8650540f11","html_url":"https://github.com/bridgetownrb/bridgetown-cloudinary","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"9230f9111f644f627ed7722aa90aa0243ae69bc7"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/bridgetownrb/bridgetown-cloudinary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bridgetownrb%2Fbridgetown-cloudinary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bridgetownrb%2Fbridgetown-cloudinary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bridgetownrb%2Fbridgetown-cloudinary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bridgetownrb%2Fbridgetown-cloudinary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bridgetownrb","download_url":"https://codeload.github.com/bridgetownrb/bridgetown-cloudinary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bridgetownrb%2Fbridgetown-cloudinary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29883778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bridgetown","bridgetown-plugin","cloudinary","image-manipulation","image-transformations"],"created_at":"2024-08-03T20:00:24.185Z","updated_at":"2026-02-27T03:33:59.846Z","avatar_url":"https://github.com/bridgetownrb.png","language":"Ruby","funding_links":[],"categories":["Official Resources","Ruby"],"sub_categories":["Official Plugins"],"readme":"# Bridgetown Cloudinary Plugin\n\n[Bridgetown](https://www.bridgetownrb.com) is a Ruby-powered static site generator.\n[Cloudinary](https://www.cloudinary.com) is digital asset management service which\nmakes uploading and serving resized, transformed, and compressed images and videos\neasy and fast.\n\nThis plugin wires the two up so you can use Cloudinary images in your blog posts,\narticles, product pages, site templates, and anywhere else you might need to\nreference media optimized for mobile and responsive design.\n\n\u003e __Note__\u003cbr /\u003e\n\u003e For users who may be familiar with the [jekyll-cloudinary](https://github.com/nhoizey/jekyll-cloudinary) plugin, this is unrelated and the usage is quite different. This plugin assumes you store your images in Cloudinary directly, not your repo.\n\n## Installation\n\nYou can install this plugin via an automation to guide you through the configuration:\n\n```shell\nbin/bridgetown apply https://github.com/bridgetownrb/bridgetown-cloudinary\n```\n\nOtheriwse, you can run this command to add this plugin to your site's Gemfile:\n\n```shell\n$ bundle add bridgetown-cloudinary\n```\n\nThen add the initializer to your configuration in `config/initializers.rb` and point to your Cloudinary\ncloud name:\n\n```ruby\ninit :\"bridgetown-cloudinary\" do\n  cloud_name \"my-cloud-name\"\nend\n```\n\n\u003e __Note__\u003cbr /\u003e\n\u003e For __Bridgetown 1.1__ or earlier, [read these instructions](https://github.com/bridgetownrb/bridgetown-cloudinary/tree/v1.2.0).\n\n## Usage\n\nThe simplest usage of the Bridgetown Cloudinary plugin is to add a `cloudinary_id` to\nthe front matter of a resource. For example:\n\n```yaml\n---\ntitle: I'm a Blog Post\ncloudinary_id: some-folder-with/image-in-cloudinary\ncategory: neat\n---\n\nI'm a blog post with an image!\n```\n\nThe plugin will automatically add `image.path` front matter with a generated URL to\nthe image in Cloudinary using the default configured transformation `open_graph`.\nThis sizes and compresses an image suitable for use on Twitter, Facebook, etc.\n(See below for information on how to change the default transformation or add your\nown.)\n\nYou can use `image.path` in a template:\n\n```liquid\n{{ post.image.path }}\n```\n\nSince `image.path` is also referenced by the Bridgetown [Feed](https://github.com/bridgetownrb/bridgetown-feed) and [SEO](https://github.com/bridgetownrb/bridgetown-seo-tag) plugins,\nyour Cloudinary images will be picked up in those contexts automatically.\n\nTo reference other available sizes, you can use either a Liquid tag or filter, or Ruby helper,\ndepending on your needs. Using a tag:\n\n```liquid\n{% cloudinary_img \"Alt text goes here\", post.cloudinary_id, \"large\" %}\n```\n\nOr a filter:\n\n```liquid\n\u003cimg alt=\"Alt text\"\n     src=\"{{ post.cloudinary_id | cloudinary_url: \"medium\" }}\"\n     /\u003e\n```\n\nOr helpers in ERB and other Ruby templates:\n\n```erb\n\u003c%= cloudinary_img \"Alt text goes here\", post.data.cloudinary_id %\u003e\n```\n\n```erb\n\u003cimg alt=\"Alt text\"\n     src=\"\u003c%= cloudinary_url post.data.cloudinary_id, :medium %\u003e\"\n     /\u003e\n```\n\n### Default Sizes Included\n\nHere's a list of all the Cloudinary transformation strings that ship with the plugin:\n\n```yaml\nopen_graph: \"c_fill,g_face:center,w_1600,h_900,q_50\" # default\ntiny: \"w_300,c_limit,q_90\"\nsmall: \"w_600,c_limit,q_85\"\nmedium: \"w_1200,c_limit,q_80\"\nlarge: \"w_1800,c_limit,q_80\"\nxlarge: \"w_2048,c_limit,q_75\"\n```\n\nThe image format used in all cases is JPG.\n\n### Optional Configuration Options\n\nIf you'd like to reference any of the configured image sizes directly through front\nmatter as an alternative to using tags or filters, you can switch this on in your\n`bridgetown.config.yml`:\n\n```yaml\ncloudinary:\n  add_transformed_urls_to_image_front_matter: true\n```\n\nThen you'll be able to reference image sizes like so:\n\n```liquid\n\u003cimg alt=\"Alt text\"\n     src=\"{{ post.image.tiny }}\"\n     /\u003e\n```\n\nBe aware that if an `image` front matter variable has already defined for a document,\nit will remain intact and the Cloudinary image transformations won't be apply for\nthat document.\n\nYou can also change or add your own transformations! Simply define them in your\nconfig:\n\n```yaml\ncloudinary:\n  transformations:\n    tiny: w_300,c_limit,q_90 # this overrides the builtin tiny transformation\n    max_bw: e_grayscale,w_4096,c_limit,q_65 # this is a new custom transformation\n```\n\nIf you configure transformations to get added to front matter, all custom\ntransformations will show up there as well:\n\n```liquid\nB\u0026W image URL: {{ post.image.max_bw }}\n```\n\n## Testing\n\n* Run `bundle exec rspec` to run the test suite\n* Or run `script/cibuild` to validate with Rubocop and test with rspec together\n\n## Contributing\n\n1. Fork it (https://github.com/bridgetownrb/bridgetown-cloudinary/fork)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Releasing\n\nTo release a new version of the plugin, simply bump up the version number in\n`version.rb` and then run `script/release`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbridgetownrb%2Fbridgetown-cloudinary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbridgetownrb%2Fbridgetown-cloudinary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbridgetownrb%2Fbridgetown-cloudinary/lists"}