{"id":25391608,"url":"https://github.com/awes-io/resize","last_synced_at":"2025-10-30T17:31:24.979Z","repository":{"id":47907415,"uuid":"238538765","full_name":"awes-io/resize","owner":"awes-io","description":"Cloudflare Image Resizing: simple API for URL generation.","archived":false,"fork":false,"pushed_at":"2023-01-05T08:57:48.000Z","size":384,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-23T22:43:20.487Z","etag":null,"topics":["api","cloudflare","crop","cropping","image","resize","resizing"],"latest_commit_sha":null,"homepage":"https://www.awes.io","language":"JavaScript","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/awes-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-05T20:10:02.000Z","updated_at":"2021-12-10T05:43:27.000Z","dependencies_parsed_at":"2023-02-03T21:46:57.419Z","dependency_job_id":null,"html_url":"https://github.com/awes-io/resize","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/awes-io%2Fresize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awes-io%2Fresize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awes-io%2Fresize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awes-io%2Fresize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awes-io","download_url":"https://codeload.github.com/awes-io/resize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239016774,"owners_count":19568302,"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":["api","cloudflare","crop","cropping","image","resize","resizing"],"created_at":"2025-02-15T15:56:06.903Z","updated_at":"2025-10-30T17:31:24.596Z","avatar_url":"https://github.com/awes-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026utm_medium=awes-io/resize\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n        \u003cimg width=\"100\" src=\"https://static.awes.io/promo/Logo_sign_color.svg\" alt=\"Awes.io logo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eCloudflare Image Resizing\u003c/h1\u003e\n\n\u003e \u003cp align=\"center\"\u003eSimple API for URL generation.\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/package-json/v/awes-io/resize/master\" alt=\"Last version\" \u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/awes-io/resize.svg\" alt=\"License\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/awes-io/awes-io\"\u003e\n        \u003cimg src=\"https://ga-beacon.appspot.com/UA-134431636-1/awes-io/resize\" alt=\"Analytics\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n### Setup\n```bash\nyarn add @awes-io/resize # yarn \nnpm i @awes-io/resize # npm \n```\n\n### Basic use\n\n```javascript\nimport resize from '@awes-io/resize'\n\n// get the image with width 640px\nresize('https://example.com/images/example.jpg', 640)\n\n// result: https://example.com/cdn-cgi/image/w=640,q=75/images/example.jpg\n```\n\n### Method\n\n```javascript\n// URL generation with parameters for resizing\nresize(url, width = null, aspect = null, options = null)\n```\n\n### Options\n\n| Name             | Type     | Default | Description                                           |\n| ---------------- | -------- | ------- | ----------------------------------------------------- |\n| url              | `String` | -       | Link to the original image.                           |\n| width            | `Number` | null    | (Optional) Width of the image, undefined by default.  |\n| aspect           | `String` | null    | (Optional) Aspect ratio for image, ie: 16x9, 4:3, etc.|\n| options          | `Object` | null    | (Optional) domain, protocol, crop, prefix             |\n| options.options          | `Object` | null    | (Optional) List of options for modify parameters for image. More info: https://developers.cloudflare.com/images/about/  |\n\n\n### Cloudflare Image Resizing Documentation\n- [https://developers.cloudflare.com/images/about/](https://developers.cloudflare.com/images/about/)\n\n\nEnsure to write proper commit message according to [Git Commit convention](https://www.conventionalcommits.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawes-io%2Fresize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawes-io%2Fresize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawes-io%2Fresize/lists"}