Skip to content

Philmod/node-resize-image-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-resize-image-server

Web server with NodeJS thats only function is to resize images from the web

What is it?

The route will resize the image specified by u (url) to the specified wxh dimensions. The dimensions are in pixels, not percent.

The image should be resized to fill the dimensions as much as possible, so cropping may be necessary. For example, if the image is 200x800, and you want to resize to 100x100, the image would first be resized to 100x400, and then the height would be cropped down to 100.

Require

Requires imagemagick CLI tools to be installed.

Use

node server.js

Example

http://localhost:3000/?w=800&h=600&u=http://upload.wikimedia.org/wikipedia/commons/0/0c/GoldenGateBridge-001.jpg

ToDo

  • Try to find a faster/lighter module to process the pictures
  • Delete the pictures in the /img directory after some time
  • Add options to compress the picture, ...
  • Tests

Author

Philmod <philippe.modard@gmail.com>

About

Web server with NodeJS thats only function is to resize images from the web

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors