{"id":14955959,"url":"https://github.com/bodacious/kirigami","last_synced_at":"2025-10-06T09:31:12.416Z","repository":{"id":40234477,"uuid":"106272393","full_name":"Bodacious/kirigami","owner":"Bodacious","description":"Cut down your assets/images to web-friendly sizes","archived":false,"fork":false,"pushed_at":"2023-03-08T19:47:46.000Z","size":117,"stargazers_count":2,"open_issues_count":10,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-28T00:48:27.779Z","etag":null,"topics":["asset-pipeline","assets-management","minimagick","rails","rails-deployment","rails5"],"latest_commit_sha":null,"homepage":null,"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/Bodacious.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-09T11:00:59.000Z","updated_at":"2022-07-26T23:06:53.000Z","dependencies_parsed_at":"2024-09-22T00:01:40.434Z","dependency_job_id":null,"html_url":"https://github.com/Bodacious/kirigami","commit_stats":{"total_commits":33,"total_committers":3,"mean_commits":11.0,"dds":"0.48484848484848486","last_synced_commit":"d86f2ad6aa5191c1984a9d5a7adaa52a6b7e3167"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Bodacious/kirigami","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Fkirigami","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Fkirigami/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Fkirigami/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Fkirigami/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bodacious","download_url":"https://codeload.github.com/Bodacious/kirigami/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Fkirigami/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278586051,"owners_count":26011100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"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":["asset-pipeline","assets-management","minimagick","rails","rails-deployment","rails5"],"created_at":"2024-09-24T13:12:05.394Z","updated_at":"2025-10-06T09:31:12.036Z","avatar_url":"https://github.com/Bodacious.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kirigami\n\nCut the images in your assets dir to a web-friendly size.\n\nKirigami performs optimisations on your images to ensure they are web-friendly.\n\nBy default, Kirigami uses the optimisation suggestions recommended by\n[Google's Page Speed Insights](https://developers.google.com/speed/docs/insights/OptimizeImages)\n\nIn ImageMagick terms, these are:\n\n    convert original.jpg -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB new.jpg\n\nImage dimensions, extensions, and filenames are not changed.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'kirigami'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install kirigami\n\n## Usage\n\n**WARNING:** This will change the size and quality of images in your Rails application.\nMake sure you have read the documentation and have backed up your images before you proceed\n\n`$ rails kirigami:cut`\n\nThis rake task will go through each of the images specified in your configuration and\ncrop their size (if necessary), remove any metadata, and compress them (JPG only).\n\nTo peek under the hood, check out [lib/kirigami/image.rb](lib/kirigami/image.rb#L28-L41)\n\n## Configuration\n\nTo configure options, add an initializer in `config/initializers/kirigami.rb`\n\n``` ruby\nKirigami.configure do |config|\n\n  # Only convert images with these extensions (default: %w[ png jpg jpeg gif ])\n  self.config.image_extensions  ||= %w[ png jpg jpeg gif ]\n\n  # Create a backup copy of each image before conversion (default: true)\n  self.config.safe_mode         ||= true\n\n  # JPEG compression quality (default: \"85%\")\n  self.config.jpeg_compression_quality ||= '85%'\n\n  # An array of dirpaths where your images are located (defaults: \"./app/assets/images\")\n  self.config.image_paths ||= \"[yourapp]/app/assets/images\"\n\n  # Ignore images within these dirpaths (default: [])\n  self.config.exclude_paths     ||= []\n\n  # Set minimagick to debug mode (default: false)\n  self.config.debug = false\n\nend if defined?(Kirigami)\n```\n\n## TODO\n\n- [ ] Add support for specifying max sizes for individual images\n- [ ] Add proper tests\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Bodacious/kirigami.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodacious%2Fkirigami","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodacious%2Fkirigami","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodacious%2Fkirigami/lists"}