https://github.com/zaadevofc/img-to-url
Eazy Upload Img to Url
https://github.com/zaadevofc/img-to-url
hosting image nodejs to upload url
Last synced: 3 months ago
JSON representation
Eazy Upload Img to Url
- Host: GitHub
- URL: https://github.com/zaadevofc/img-to-url
- Owner: zaadevofc
- License: apache-2.0
- Created: 2022-11-13T05:58:17.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-02T04:36:23.000Z (about 2 years ago)
- Last Synced: 2025-04-11T18:04:16.719Z (3 months ago)
- Topics: hosting, image, nodejs, to, upload, url
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/img-to-url
- Size: 9.51 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Image to Url Converter
Ubah gambar menjadi url dengan instan!, gambarmu akan bisa diakses melalui url yang sudah dikonversi nantinya!
Di hosting menggunakan [EzGif](https://ezgif.com).
* Ekstensi yang didukung : `GIF, JPG, PNG, BMP, WebP, APNG, HEIC, FLIF, AVIF, MNG`
* Batas maksimal ukuran file : `50MB`## Installation
Install with npm:
```js
$ npm install img-to-url
```With require:
```js
const img2url = require("img-to-url");
```### Usage
#### Example :
see [example.js](https://github.com/zaadevofc/img-to-url/blob/master/example.js) for details.
```js
const getUrl = async () => {
const result = await img2url.upload('./your/path/image.png').then(x => x)
console.log(result)
/* Result :
{
ok: true,
code: 200,
result: {
url: 'https://im.ezgif.com/tmp/.png',
mime: 'image/png',
size: 245844
},
HostedBy: 'https://ezgif.com',
CreatedBy: 'https://github.com/zaadevofc'
}
*/
}
```## Testing
Install dependencies:
```
npm install
```Run tests:
```
npm run test
```## License
Code released under the [MIT license](LICENSE).