{"id":30061657,"url":"https://github.com/devshahrukhanwar/croppy-library","last_synced_at":"2025-10-14T16:04:55.211Z","repository":{"id":271757180,"uuid":"407175478","full_name":"devshahrukhanwar/croppy-library","owner":"devshahrukhanwar","description":"It is a wrapper around croppie js library built on top of vanilla javascript. Easy to use and fast to implement. Implement the crop on images and preview them just in 3-5 lines of code. It takes care of everything neccesary for implementing a basic crop functionality.Most of the things are customisable and totally flexible as in the original plugin","archived":false,"fork":false,"pushed_at":"2025-07-04T14:18:31.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-08T02:40:17.625Z","etag":null,"topics":["cropper","croppiejs","javascript","jquery","side-project"],"latest_commit_sha":null,"homepage":"https://croppy-library.vercel.app","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/devshahrukhanwar.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-16T13:27:49.000Z","updated_at":"2025-07-04T14:18:35.000Z","dependencies_parsed_at":"2025-01-10T10:31:25.031Z","dependency_job_id":null,"html_url":"https://github.com/devshahrukhanwar/croppy-library","commit_stats":null,"previous_names":["shahrukh4/croppy-library","devshahrukhanwar/croppy-library"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devshahrukhanwar/croppy-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devshahrukhanwar%2Fcroppy-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devshahrukhanwar%2Fcroppy-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devshahrukhanwar%2Fcroppy-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devshahrukhanwar%2Fcroppy-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devshahrukhanwar","download_url":"https://codeload.github.com/devshahrukhanwar/croppy-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devshahrukhanwar%2Fcroppy-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019555,"owners_count":26086750,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"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":["cropper","croppiejs","javascript","jquery","side-project"],"created_at":"2025-08-08T02:27:31.888Z","updated_at":"2025-10-14T16:04:55.165Z","avatar_url":"https://github.com/devshahrukhanwar.png","language":"JavaScript","funding_links":["https://github.com/sponsors/devshahrukhanwar","https://www.buymeacoffee.com/devshahrukh"],"categories":[],"sub_categories":[],"readme":"# 🚀 Croppie Library\nIt is a wrapper around [croppie](https://foliotek.github.io/Croppie/) js library built on top of vanilla javascript. Easy to use and fast to implement. Implement the crop on images and preview them just in 3-5 lines of code. No muss no fuss. We take care of everything necessary for implementing a basic crop library.\nMost of the things are customisable and totally flexible as in the original library written by **foliotek**.\n\n---\n\n# 🏗️ Steps to use\n- Download the source code via HTTPS or clone it to your local and place the `crop.js` and `crop.css` files as per your project hierarchy of public JS and CSS files.\n\n```\n\u003c!-- Crop CSS --\u003e\n\u003clink rel=\"stylesheet\" href=\"../src/css/crop.css\"\u003e\n\n\u003c!-- Crop JS --\u003e\n\u003cscript src=\"../src/js/crop.min.js\"\u003e\u003c/script\u003e\n```\n\n- Instantiate the object as follows just in three basic line of codes.\n\n```\nlet crop = new ImageCrop({\n    crop : true,                     //Optional (Default: true)\n    showPreview: true,               //Optional (Default: false)\n    imagePreview : '.image_preview', \n    //Required if want to show crop image preview (This is id/class of div which must contain \u003cimg\u003e tag)\n});\n```\n\n- Now place event listener for the image change (i.e. when user select an image)\n```\n//On clicking on image select\ndocument.getElementById('YOUR_INPUT_FILE_ID').addEventListener('change', function(){\n    crop.initCrop(this);\n});\n```\n- Now place the code for after clicking the crop button\n```\n//On clicking on crop\ndocument.getElementById('crop_image').addEventListener('click', function(){\n    console.log(crop.getData()); //getData() gives the cropped image data\n});\n```\n\n- Wollaa... the crop for image is now implemented and you can test it now.\n\n---\n\n# 🧩 Examples\n- There are three examples given with this library (i.e. [index.html](index.html), [examples/blog.html](examples/blog.html), [examples/album.html](examples/album.html))\n- Please take the reference from examples to extend the library as per your needs.\n\n---\n\n# 📝 Note\nThis is not a full fletched library, it is simple to implement and customisable. You can customise as per the examples given by us and even provide your `crop modal` HTML to the `ImageCrop` instance.\n\n---\n\n## 🤝 Contact\n\n- 📧 Email: [shahrukhanwar@proton.me](mailto:shahrukhanwar@proton.me)\n- 🌐 Portfolio: [shahrukhanwar.vercel.app](https://shahrukhanwar.vercel.app)\n- 💼 LinkedIn: [linkedin.com/in/devshahrukh](https://www.linkedin.com/in/devshahrukh)\n- 🐦 Twitter: [x.com/devshahrukh](https://x.com/devshahrukh)\n\n---\n\n## 📄 License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n---\n\n## 💖 Sponsor \u0026 Support\n\nIf you find this project useful, consider supporting me:\n\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://github.com/sponsors/devshahrukhanwar\"\u003e\u003cimg src=\"https://img.shields.io/badge/Sponsor%20on-GitHub-E4405F?logo=githubsponsors\u0026logoColor=fff\u0026style=flat\" alt=\"Sponsor on GitHub\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/devshahrukh\"\u003e\u003cimg src=\"https://img.shields.io/badge/Buy%20Me%20a%20Coffee-FFDD00?logo=buymeacoffee\u0026logoColor=000\u0026style=flat\" alt=\"Buy Me a Coffee\"/\u003e\u003c/a\u003e\n\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevshahrukhanwar%2Fcroppy-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevshahrukhanwar%2Fcroppy-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevshahrukhanwar%2Fcroppy-library/lists"}