Skip to content

klehmann/imageresizer-libvips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image resize server

Contains Dockerfiles to build a Node.js based image resize server which uses sharp/libvips to return a resized/cropped version of an image in the mapped filesystem.

Libvips is a fast image processing library with low memory needs. It has a much better throughput compared to GraphicsMagick.

Sharp wraps Libvips as a Node.js module.

Installation

  • follow the instructions in directory "node-bash" to build a Docker image with Node.js and bash (added for development purpose on top of Alpine)
  • now build the Docker image for the image resize server in directory "resizeserver"

Usage

Run the container with the commands/parameters listed in "resizeserver/dockerrun.sh". This mounts a local directory into the Docker container and starts the server on port 4400.

There are two types of URLs: one to resize and another one to crop the image. In the example below we use with=500px and height=400px and process the image filepath "subdir/DSC00191.JPG" within the image base directory.

License

The code is available under Apache 2.0 license.

Copyright by Mindoo GmbH

Credits

  • Node.js server idea and sourcecode are inspired by this blog article
  • Performance comparison between various resize libraries (e.g. GraphicsMagick and libvips): article link

About

Node.js base server to resize and crop local image files with sharp/libvips.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors