This repository contains a simple image proxy server built with Node.js and Express.js. The server allows you to fetch and serve images from remote URLs by providing the image URL as a query parameter. It retrieves the image, sets the appropriate Content-Type header, and streams the image data as the response.
- Fetch and serve images from remote URLs
- Support for various image formats and Content-Type handling
- Lightweight and efficient with Express.js
- Easy to use and deploy
-
Make sure you have Node.js installed on your system.
-
Clone this repository:
git clone https://github.com/spidirman/image-proxy-server.git
-
Install the dependencies:
npm install express axios
-
Start the server:
cd image-proxy-server node server.js
-
Send a GET request to the /image endpoint with the image URL as a query parameter:
GET /image?url=https://example.com/image.jpg
The server will fetch the image, set the appropriate Content-Type header, and stream the image data as the response.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
Please note that this application is intended for educational and personal use only. Make sure to respect copyright and usage rights when using images from external sources.