Retrieve image assets at any size from a single source image
Use the package manager npm to install dependencies.
npm install
Add source images to /images
directory
You can change the port in the .env
file.
node server.js
// Original
http://localhost:5555/landscape.jpg
// Optimised
http://localhost:5555/landscape.jpg?width=800
http://localhost:5555/landscape.jpg?width=1000&format=png
http://localhost:5555/landscape.jpg?width=1500&blur=3
- width
- height
- blur
- format (jpg, png)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.