{"id":13879868,"url":"https://github.com/shrinerb/shrine-imgix","last_synced_at":"2025-04-30T20:30:40.315Z","repository":{"id":56895453,"uuid":"47474718","full_name":"shrinerb/shrine-imgix","owner":"shrinerb","description":"Imgix integration for Shrine","archived":false,"fork":false,"pushed_at":"2020-11-06T22:22:51.000Z","size":40,"stargazers_count":13,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-22T17:33:12.271Z","etag":null,"topics":["imgix","on-the-fly","processing","shrine","storage"],"latest_commit_sha":null,"homepage":"https://www.imgix.com/","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/shrinerb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-05T22:15:35.000Z","updated_at":"2020-12-01T00:00:20.000Z","dependencies_parsed_at":"2022-08-20T17:10:22.733Z","dependency_job_id":null,"html_url":"https://github.com/shrinerb/shrine-imgix","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shrinerb%2Fshrine-imgix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shrinerb%2Fshrine-imgix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shrinerb%2Fshrine-imgix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shrinerb%2Fshrine-imgix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shrinerb","download_url":"https://codeload.github.com/shrinerb/shrine-imgix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224177670,"owners_count":17268717,"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","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":["imgix","on-the-fly","processing","shrine","storage"],"created_at":"2024-08-06T08:02:36.767Z","updated_at":"2024-11-12T05:27:20.831Z","avatar_url":"https://github.com/shrinerb.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Shrine::Storage::Imgix\n\nProvides [Imgix] integration for [Shrine].\n\nImgix is a service for processing images on the fly, and works with files\nstored on external services such as AWS S3 or Google Cloud Storage.\n\n## Installation\n\n```ruby\ngem \"shrine-imgix\"\n```\n\n## Configuring\n\nLoad the `imgix` plugin with Imgix client settings:\n\n```rb\nShrine.plugin :imgix, client: {\n  host:             \"your-subdomain.imgix.net\",\n  secure_url_token: \"abc123\",\n}\n```\n\nYou can also pass in an `Imgix::Client` object directly:\n\n```rb\nrequire \"imgix\"\n\nimgix_client = Imgix::Client.new(\n  host:             \"your-subdomain.imgix.net\",\n  secure_url_token: \"abc123\",\n)\n\nShrine.plugin :imgix, client: imgix_client\n```\n\n### Path prefix\n\nIf you've configured a \"Path Prefix\" on your Imgix source, and you also have\n`:prefix` set on your Shrine storage, you'll need tell the `imgix` plugin to\nexclude the storage prefix from generated URLs:\n\n```rb\nShrine.plugin :imgix, client: ..., prefix: false\n```\n\n## Usage\n\nYou can generate an Imgix URL for a `Shrine::UploadedFile` object by calling\n`#imgix_url`:\n\n```rb\nphoto.image.imgix_url(w: 150, h: 200, fit: \"crop\")\n#=\u003e \"http://my-subdomain.imgix.net/943kdfs0gkfg.jpg?w=150\u0026h=200\u0026fit=crop\"\n```\n\nSee the [Imgix docs][url reference] for all available URL options.\n\n### Rails\n\nIf you're using [imgix-rails] and want to use the `ix_*` helpers, you can use\n`#imgix_id` to retrieve the Imgix path:\n\n```erb\n\u003c%= ix_image_tag photo.image.imgix_id, url_params: { w: 300, h: 500, fit: \"crop\" } %\u003e\n```\n\n### Purging\n\nIf you want images to be automatically [purged][purging] from Imgix on\ndeletion, you can set `:purge` to `true`:\n\n```rb\nShrine.plugin :imgix, client: ..., purge: true\n```\n\nYou can also purge manually with `Shrine::UploadedFile#imgix_purge`:\n\n```rb\nphoto.image.imgix_purge\n```\n\nNote that purging requires passing the `:api_key` option to your Imgix client.\n\n## Development\n\nYou can run the test suite with:\n\n```sh\n$ bundle exec rake test\n```\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\n[Imgix]: https://www.imgix.com/\n[Shrine]: https://github.com/janko/shrine\n[imgix]: https://github.com/imgix/imgix-rb\n[url reference]: https://docs.imgix.com/apis/url\n[imgix-rails]: https://github.com/imgix/imgix-rails\n[purging]: https://docs.imgix.com/setup/purging-images\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshrinerb%2Fshrine-imgix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshrinerb%2Fshrine-imgix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshrinerb%2Fshrine-imgix/lists"}