{"id":50645947,"url":"https://github.com/travisbrown/image-cache","last_synced_at":"2026-06-07T12:31:29.019Z","repository":{"id":319114164,"uuid":"1077562122","full_name":"travisbrown/image-cache","owner":"travisbrown","description":"Image scraper","archived":false,"fork":false,"pushed_at":"2026-03-11T10:56:19.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-11T17:13:33.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travisbrown.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-16T12:25:07.000Z","updated_at":"2026-03-11T10:56:24.000Z","dependencies_parsed_at":"2025-10-18T05:21:38.729Z","dependency_job_id":"bef90809-b1b0-4210-ba62-8d699503b727","html_url":"https://github.com/travisbrown/image-cache","commit_stats":null,"previous_names":["travisbrown/image-scraper","travisbrown/image-cache"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/travisbrown/image-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fimage-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fimage-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fimage-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fimage-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travisbrown","download_url":"https://codeload.github.com/travisbrown/image-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fimage-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34022031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"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":[],"created_at":"2026-06-07T12:31:27.867Z","updated_at":"2026-06-07T12:31:29.014Z","avatar_url":"https://github.com/travisbrown.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image cache\n\n[![Rust build status](https://img.shields.io/github/actions/workflow/status/travisbrown/image-cache/ci.yaml?branch=main)](https://github.com/travisbrown/image-cache/actions)\n[![Coverage status](https://img.shields.io/codecov/c/github/travisbrown/image-cache/main.svg)](https://codecov.io/github/travisbrown/image-cache)\n\nA simple [Rust][rust] image cache service.\n\nWhile the code is mostly generic, it is designed for a specific use case (browsing an index of products from e.g. the Apple app store). In general you are probably better off using something like Nginx's [`proxy_cache`][nginx-proxy-cache].\n\n## Usage\n\nFirst compile:\n\n```bash\n$ cargo build --release\n```\n\nThen start the service, pointing to one directory for the image file data, and another for the index (if these directories do not exist, they will be created):\n\n```bash\n$ target/release/image-cache-service serve -vvvv --store tmp/store/ --prefix 2/2 --index tmp/index/\n```\n\nNext you can request a list of image URLs to be rewritten as local URLs:\n\n```bash\n$ curl -s --header \"Content-Type: application/json\" --data '[\"https://play-lh.googleusercontent.com/yiahWgvUqKOPvraFOZPi-ozqXFY_LaIbBoALS6YyXKwkls80CJkntHvbNy9bT4DogQ\"]' \"http://localhost:3000/urls\" | jq\n[\n  \"http://0.0.0.0:3000/request/aHR0cHM6Ly9wbGF5LWxoLmdvb2dsZXVzZXJjb250ZW50LmNvbS95aWFoV2d2VXFLT1B2cmFGT1pQaS1venFYRllfTGFJYkJvQUxTNll5WEt3a2xzODBDSmtudEh2Yk55OWJUNERvZ1E\"\n]\n```\n\nYou should then be able to open [this URL](http://localhost:3000/request/aHR0cHM6Ly9wbGF5LWxoLmdvb2dsZXVzZXJjb250ZW50LmNvbS95aWFoV2d2VXFLT1B2cmFGT1pQaS1venFYRllfTGFJYkJvQUxTNll5WEt3a2xzODBDSmtudEh2Yk55OWJUNERvZ1E)\nin a browser on the same machine.\n\nThe first time you visit the returned URL, the service will save the image locally. If you request a local URL for the same source URL, you'll get a different result:\n\n```bash\n$ curl -s --header \"Content-Type: application/json\" --data '[\"https://play-lh.googleusercontent.com/yiahWgvUqKOPvraFOZPi-ozqXFY_LaIbBoALS6YyXKwkls80CJkntHvbNy9bT4DogQ\"]' \"http://localhost:3000/urls\" | jq\n[\n  \"http://0.0.0.0:3000/static/8f857f3113b366309a448ace2a5a1abf.jpeg\"\n]\n```\n\nThis \"static\" URL will be used for any future requests for the same source image URL.\n\n## License\n\nThis software is licensed under the [GNU General Public License v3.0][gpl-v3] (GPL-3.0).\n\n[gpl-v3]: https://www.gnu.org/licenses/gpl-3.0.en.html\n[nginx-proxy-cache]: https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/\n[rust]: https://rust-lang.org/\n[rust-installation]: https://doc.rust-lang.org/cargo/getting-started/installation.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravisbrown%2Fimage-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravisbrown%2Fimage-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravisbrown%2Fimage-cache/lists"}