1.0.3 ⢠Published 5 months ago
imgur-link v1.0.3
Here's your professional README.md
file with all the details you requested:
lmgur_link - Upload Images to Imgur Effortlessly
š lmgur_link is a simple and efficient Node.js package for uploading images to Imgur. It provides an Express API with an elegant HTML web UI for easy image uploads and sharing.
⨠Features
ā Upload any image format (JPG, PNG, GIF, etc.)
ā Fast & Reliable ā Uses Imgur's API for instant uploads
ā Copy Image URL directly from UI
ā Auto-delete local files after upload
ā Simple API endpoint for automation
š¦ Installation & Setup
1ļøā£ Install the Package in Your Project
npm i imgur-link
2ļøā£ Import and Use in Your Node.js Project
const { uploadToImgur } = require("imgur-link");
async function testUpload() {
try {
const imgUrl = await uploadToImgur("image.jpg");
console.log("Imgur URL:", imgUrl);
} catch (error) {
console.error("Error uploading image:", error);
}
}
testUpload();
šÆ Using the imgur-link
NPM Package
Installation in Another Project
npm install imgur-link
Usage in Your Project
const { uploadToImgur } = require("imgur-link");
async function testUpload() {
try {
const imgUrl = await uploadToImgur("image.jpg");
console.log("Imgur URL:", imgUrl);
} catch (error) {
console.error("Error uploading image:", error);
}
}
testUpload();
š Running the Express Server (For Web UI & API)
1ļøā£ Clone the Repository
git clone https://github.com/rrashedul59/imgur_link.git
cd imgur2
2ļøā£ Install Dependencies
npm install
3ļøā£ Start the Server
npm start
4ļøā£ Open in Browser
Visit: http://localhost:3000
ā Upload an image
ā Get the Imgur link
ā Copy the link with one click
š API Usage
⤠Upload Image via API
Endpoint:
POST /upload
Body (Form-Data):
image
(File) - The image file to upload
Response:
{
"success": true,
"url": "https://i.imgur.com/example.jpg"
}
š” Project Structure
imgur_link/
āāā imgur2.js # Handles image upload to Imgur
āāā index.js # Main export file for the package
āāā package.json # NPM package config
āāā README.md # Documentation
---
## š **License**
This project is **MIT Licensed** ā Free to use, modify, and distribute.
---
## š¢ **Author & Contact**
š» **Made by:** Sheikh Tamim
š© **Messenger:** [m.me/sheikh.tamim.lover](https://m.me/sheikh.tamim.lover)
šø **Instagram:** [@sheikh.tamim_lover](https://www.instagram.com/sheikh.tamim_lover)
---
Let me know if you want any modifications! šš„