{"id":16750117,"url":"https://github.com/alexferl/air","last_synced_at":"2025-03-16T04:20:28.417Z","repository":{"id":83557147,"uuid":"455394574","full_name":"alexferl/air","owner":"alexferl","description":"Asset storage and on-the-fly image resize","archived":false,"fork":false,"pushed_at":"2022-04-24T22:41:50.000Z","size":4036,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T16:48:36.170Z","etag":null,"topics":["go","golang","image-resizer","libvips","vips","vips-image"],"latest_commit_sha":null,"homepage":"","language":"Go","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/alexferl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-02-04T02:08:36.000Z","updated_at":"2022-02-05T03:33:51.000Z","dependencies_parsed_at":"2023-07-07T19:15:40.146Z","dependency_job_id":null,"html_url":"https://github.com/alexferl/air","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexferl%2Fair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexferl%2Fair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexferl%2Fair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexferl%2Fair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexferl","download_url":"https://codeload.github.com/alexferl/air/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243823306,"owners_count":20353648,"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":["go","golang","image-resizer","libvips","vips","vips-image"],"created_at":"2024-10-13T02:27:07.378Z","updated_at":"2025-03-16T04:20:28.388Z","avatar_url":"https://github.com/alexferl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# air - Asset \u0026 Image Resize\n\nAsset storage and on-the-fly image resize powered by [libvips](https://github.com/libvips/libvips).\n\n### Uploading an asset\n```shell\n$ http -f POST http://127.0.0.1:1323/upload file@cat.png\nHTTP/1.1 201 Created\nAccess-Control-Allow-Origin: *\nContent-Length: 78\nContent-Type: application/json; charset=UTF-8\nDate: Fri, 04 Feb 2022 02:31:54 GMT\nLocation: /assets/b056dab52b1ad845a72da28ab28bcc39948011ec68122ff791da252afdfcd67e\nVary: Origin\n\n{\n    \"id\": \"b056dab52b1ad845a72da28ab28bcc39948011ec68122ff791da252afdfcd67e\"\n}\n```\n\n### Retrieving an asset\nRetrieve an asset in the format it was uploaded:\n```shell\n$ http http://127.0.0.1:1323/assets/b056dab52b1ad845a72da28ab28bcc39948011ec68122ff791da252afdfcd67e\n\nHTTP/1.1 200 OK\nAccess-Control-Allow-Origin: *\nContent-Type: image/png\nDate: Fri, 04 Feb 2022 02:32:10 GMT\nTransfer-Encoding: chunked\nVary: Origin\n```\n\nRetrieve an image asset in a different format:\n```shell\n$ http http://127.0.0.1:1323/assets/b056dab52b1ad845a72da28ab28bcc39948011ec68122ff791da252afdfcd67e?format=jpeg\nContent-Type: image/jpeg\n```\nValid formats are `jpeg`, `png` and `webp`.\n\nRetrieve an image asset in a different size:\n```shell\n$ http http://127.0.0.1:1323/assets/b056dab52b1ad845a72da28ab28bcc39948011ec68122ff791da252afdfcd67e?size=640x480\n```\nValid size parameters (max size: `5000`x`5000`):\n```\nsize=640x480 # force size, that is, break aspect ratio\nsize=640  # will scale the height accordingly\nwidth=640\u0026height=480 # force size, that is, break aspect ratio\nwidth=640  # will scale the height accordingly\nheight=480  # will scale the width accordingly\n```\n\nRetrieve an image asset in a different quality:\n```shell\n$ http http://127.0.0.1:1323/assets/b056dab52b1ad845a72da28ab28bcc39948011ec68122ff791da252afdfcd67e?quality=50\n```\nThe quality must be between `1` and `100`.\n\n## Development\n\nInstall libvips by following the instructions [here](https://github.com/davidbyttow/govips#dependencies).\n\n### Installing dependencies\n```shell\n$ make dev\n```\n\n### Building and running\n```shell\n$ make run\n```\n\n### Running tests\n```shell\n$ make test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexferl%2Fair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexferl%2Fair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexferl%2Fair/lists"}