{"id":28713666,"url":"https://github.com/sottar/react-image-resizer","last_synced_at":"2025-06-15T00:11:38.332Z","repository":{"id":20961750,"uuid":"91397350","full_name":"sottar/react-image-resizer","owner":"sottar","description":"react-image-resizer is a React component that resizes the image to be nice.","archived":false,"fork":false,"pushed_at":"2025-06-11T21:42:53.000Z","size":506,"stargazers_count":32,"open_issues_count":24,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T22:42:27.943Z","etag":null,"topics":["image","javascript","react","react-components"],"latest_commit_sha":null,"homepage":"","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/sottar.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,"zenodo":null}},"created_at":"2017-05-16T00:40:26.000Z","updated_at":"2024-11-01T12:04:28.000Z","dependencies_parsed_at":"2023-01-12T01:30:22.024Z","dependency_job_id":"60c13bb9-a7d0-481e-8c48-abed6cacbb6b","html_url":"https://github.com/sottar/react-image-resizer","commit_stats":{"total_commits":58,"total_committers":5,"mean_commits":11.6,"dds":0.4482758620689655,"last_synced_commit":"d2abe409afa18c8fdee5b55ae780d303a274b775"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sottar/react-image-resizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sottar%2Freact-image-resizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sottar%2Freact-image-resizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sottar%2Freact-image-resizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sottar%2Freact-image-resizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sottar","download_url":"https://codeload.github.com/sottar/react-image-resizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sottar%2Freact-image-resizer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259901390,"owners_count":22929227,"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":["image","javascript","react","react-components"],"created_at":"2025-06-15T00:11:37.540Z","updated_at":"2025-06-15T00:11:38.309Z","avatar_url":"https://github.com/sottar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-image-resizer\n\n[![Build Status](https://travis-ci.org/sottar/react-image-resizer.svg?branch=master)](https://travis-ci.org/sottar/react-image-resizer)\n[![npm version](https://badge.fury.io/js/react-image-resizer.svg)](https://badge.fury.io/js/react-image-resizer)\n\n`react-image-resizer` is a React component that resizes the image to be nice.\n\n## Installation\n\n```sh\n# use npm\n$ npm install -D react-image-resizer\n\n# use yarn\n$ yarn add -D react-image-resizer\n```\n\n## Usage\n\n```javascript\nimport React from 'react';\nimport Image from 'react-image-resizer';\n\nclass App extends React.Component {\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cImage\n          src=\"path/to/image.jpg\"\n          height={ /*resize height*/ }\n          width={ /*resize width*/ }\n        /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\n## Examples\n\n``` javascript\n\u003cImage\n  src=\"path/to/image.jpg\"\n  width={240}\n  height={240}\n  style={style.image}\n/\u003e\nconst style = {\n  image: {\n    border: '1px solid #ccc',\n    background: '#fefefe',\n  },\n};\n```\n\nHorizontally long case | Vertically long case | disable image\n:---:|:---:|:---:\n![Horizontally](example-images/horizontally.png) | ![Vertically](example-images/vertically.png) | ![noimage](example-images/noimage.png)\n\n\n## Options\n\nname | required | type | default | description\n---|---|---|---|---\nsrc | true | String |  | Path to your image\nalt | false | String |  | Image description\nheight | true | Number | 0 | Height after resize (px only)\nwidth | true | Number | 0 | Width after resize (px only)\nstyle | false | object |  | Wrapper style of image\nnoImageSrc | false | String |  | Path when image could not be acquired\nnoImageAlt | false | String | 'noimage' | description when image could not be acquired\n\n\n## License\n\n[MIT](https://github.com/sottar/react-image-resizer/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsottar%2Freact-image-resizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsottar%2Freact-image-resizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsottar%2Freact-image-resizer/lists"}