{"id":13568268,"url":"https://github.com/mbarde/volto-image-crop-widget","last_synced_at":"2025-04-04T04:30:53.817Z","repository":{"id":57683001,"uuid":"486601278","full_name":"mbarde/volto-image-crop-widget","owner":"mbarde","description":"Volto add-on: Extends Voltos FileWidget to be able to crop images in-place.","archived":false,"fork":false,"pushed_at":"2023-04-18T11:44:48.000Z","size":17537,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T03:09:32.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbarde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-04-28T13:15:49.000Z","updated_at":"2024-06-11T13:02:45.000Z","dependencies_parsed_at":"2024-01-14T03:48:01.618Z","dependency_job_id":"a8db146e-c8c5-4bde-ad4c-c5232e12eae2","html_url":"https://github.com/mbarde/volto-image-crop-widget","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"50ed75e013d8d832e26a2ca3029d333f5ff67d19"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarde%2Fvolto-image-crop-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarde%2Fvolto-image-crop-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarde%2Fvolto-image-crop-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarde%2Fvolto-image-crop-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbarde","download_url":"https://codeload.github.com/mbarde/volto-image-crop-widget/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123072,"owners_count":20887259,"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":[],"created_at":"2024-08-01T14:00:22.400Z","updated_at":"2025-04-04T04:30:49.537Z","avatar_url":"https://github.com/mbarde.png","language":"JavaScript","funding_links":[],"categories":["Add-ons"],"sub_categories":["Widgets"],"readme":"# volto-image-crop-widget\n\nExtends built-in FileWidget of [Volto](https://github.com/plone/volto) to be able to crop images in-place using [react-image-crop](https://www.npmjs.com/package/react-image-crop).\n\n![Demo](https://github.com/mbarde/volto-image-crop-widget/raw/docs/docs/demo.gif)\n\n### Why?\n\nUsers do not have to know \u0026 use external tools when they want to crop images.\n\n## Features\n\n* Free crop\n* Fixed aspect ratio crop\n* Adjust brighness\n* Flip\n\n## Setup\n\n### Add volto-image-crop-widget to your Volto project\n\n1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone\n\n(for example via `docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e PROFILES=\"plone.volto:default-homepage\" plone/plone-backend:6.0.1`)\n\n2. Start Volto frontend\n\n- If you already have a volto project, just update `package.json`:\n\n  ```JSON\n  \"addons\": [\n      \"@mbarde/volto-image-crop-widget\"\n  ],\n\n  \"dependencies\": {\n      \"@mbarde/volto-image-crop-widget\": \"*\"\n  }\n  ```\n\n- If not, create one:\n\n  ```\n  npm install -g yo @plone/generator-volto\n  yo @plone/volto my-volto-project --addon @mbarde/volto-image-crop-widget\n  cd my-volto-project\n  ```\n\n3. Install new add-ons and restart Volto:\n\n   ```\n   yarn\n   yarn start\n   ```\n\n4. Go to http://localhost:3000\n\n\n## Configuration\n\n### Enable and define aspect crops:\n\n```Javascript\nexport default function applyConfig(config) {\n  config.settings.image_crop_aspect_ratios = [\n    {\n      label: '16:9',\n      ratio: 16 / 9,\n    },\n    {\n      label: '4:3',\n      ratio: 4 / 3,\n    },\n    {\n      label: '1:1',\n      ratio: 1,\n    },\n  ];\n  return config;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbarde%2Fvolto-image-crop-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbarde%2Fvolto-image-crop-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbarde%2Fvolto-image-crop-widget/lists"}