{"id":20826911,"url":"https://github.com/crizmo/image2url","last_synced_at":"2025-05-07T20:42:26.277Z","repository":{"id":65150705,"uuid":"583552612","full_name":"crizmo/image2url","owner":"crizmo","description":"Converts image to url using discord.js","archived":false,"fork":false,"pushed_at":"2024-03-16T04:38:17.000Z","size":92,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T20:42:20.997Z","etag":null,"topics":["image-to-url","nodejs","npm","npm-package","url"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/image2url","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/crizmo.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-12-30T05:54:19.000Z","updated_at":"2024-03-19T06:56:47.000Z","dependencies_parsed_at":"2024-11-17T23:10:30.953Z","dependency_job_id":"1d0924ce-6051-4c31-bb4f-0d902e514d13","html_url":"https://github.com/crizmo/image2url","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"71da9cc73dcd75d4f18b883765ac0aae43d318ab"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fimage2url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fimage2url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fimage2url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fimage2url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crizmo","download_url":"https://codeload.github.com/crizmo/image2url/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954127,"owners_count":21830893,"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-to-url","nodejs","npm","npm-package","url"],"created_at":"2024-11-17T23:10:28.049Z","updated_at":"2025-05-07T20:42:26.255Z","avatar_url":"https://github.com/crizmo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/crizmo/image2url\"\u003e\n    \u003cimg src=\"https://cdn.discordapp.com/attachments/910210865683386408/1058270655625314344/Untitled_design.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eImage2Url\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/image2url\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/image2url.svg?maxAge=3600\u0026style=for-the-badge\" alt=\"NPM version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/image2url\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/image2url?style=for-the-badge\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/image2url\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/image2url?style=for-the-badge\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    Convert images to urls\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/crizmo/image2url\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/crizmo/image2url\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/crizmo/image2url/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/crizmo/image2url/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n    \n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#functions\"\u003eFunctions\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\nConvert images to urls using discord bot / imgbb api \u003cbr\u003e\n- How it works \u003cbr\u003e\nFor discord: \u003cbr\u003e\nImages are sent to a discord channel that you specify. \u003cbr\u003e\nThe bot will then get the proxy url of the image and then return it to you. \u003cbr\u003e\n\nFor imgbb: \u003cbr\u003e\nImages are sent to imgbb database and then the url is returned to you. \u003cbr\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Getting Started\n\n**For Discord** \u003cbr\u003e\n1. Make a discord bot in discord developer portal\n2. Copy the token and paste it in the .env file named `DISCORD_TOKEN`\n3. Invite the bot to your server\n4. Get the channel id of the channel where you want to send the images\n5. Paste the channel id in the .env file named `DISCORD_CHANNEL`\n6. Check env_example file for more info - \u003ca href=\"/tests/.env_example\"\u003eenv_example\u003c/a\u003e\n7. Install the required packages - `discord.js, dotenv, fs`\n8. Install image2url using npm \u003cbr\u003e\n   ```sh\n   npm install image2url\n   ```\n9. Require the package in your main file \u003cbr\u003e\n   ```JS\n   const image2url = require('image2url');\n   ```\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n**For Imgbb** \u003cbr\u003e\n1. Make an account on imgbb\n2. Get the api key from the dashboard\n3. Paste the api key in the .env file named `IMG_BB_KEY`\n4. Install the required packages - `axios, dotenv, fs, form-data`\n\n## Functions\n\n```javascript\n\n// Discord upload\n\nimage2url.init({\n    token: process.env.DISCORD_TOKEN,\n    channel: process.env.DISCORD_CHANNEL\n});\n\nimage2url.upload('tests/kurizu.jpg', 'kurizu pfp').then(url =\u003e {\n    console.log(url);\n});\n\n\n// Imgbb upload\nconst imagePath = 'tests/kurizu.jpg';\n\nimage2url.imgbb_upload(imagePath, process.env.IMG_BB_KEY)\n    .then((url) =\u003e {\n        console.log('Image uploaded successfully. URL:', url);\n    })\n    .catch((error) =\u003e {\n        console.error('Image upload failed with error:', error);\n    });\n```\nCheck env_example file for more info - \u003ca href=\"/tests/.env_example\"\u003eenv_example\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Usage\n\n```javascript\nconst image2url = require('image2url');\nrequire('dotenv').config()\n\n// Discord upload\n\nimage2url.init({\n    token: process.env.DISCORD_TOKEN,\n    channel: process.env.DISCORD_CHANNEL\n});\n\nimage2url.upload('tests/kurizu.jpg', 'kurizu pfp').then(url =\u003e {\n    console.log(url);\n});\n\n\n// Imgbb upload\nconst imagePath = 'tests/kurizu.jpg';\n\nimage2url.imgbb_upload(imagePath, process.env.IMG_BB_KEY)\n    .then((url) =\u003e {\n        console.log('Image uploaded successfully. URL:', url);\n    })\n    .catch((error) =\u003e {\n        console.error('Image upload failed with error:', error);\n    });\n```\n\nNote: \n1. tests/kurizu.jpg is the path to the image you want to send. \u003cbr\u003e\n2. kurizu pfp is the name of the image. \u003cbr\u003e\n3. The url will have the name that you specified. which in this case is kurizu pfp. \u003cbr\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n## For more information on how to use it visit\n\n- [Github](https://github.com/crizmo/image2url)\n- [Example](https://github.com/crizmo/image2url/tree/main/tests)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Roadmap\n\n- [ ] Add Changelog\n- [ ] Add Tests\n- [ ] Add Additional Templates w/ Examples\n- [ ] Add Support for more image formats\n- [ ] Documentation\n    - [ ] Website\n    - [ ] Examples\n    - [ ] Wiki\n- [ ] Add Support for more platforms\n\nSee the [open issues](https://github.com/crizmo/image2url/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Contact\nPackage Made by: `kurizu.taz` on discord \u003cbr\u003e\nGithub - [https://github.com/crizmo/image2url](https://github.com/crizmo/image2url)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrizmo%2Fimage2url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrizmo%2Fimage2url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrizmo%2Fimage2url/lists"}