Sign inSign up

timoreymann/imageserver

By timoreymann

Updated almost 6 years ago
Archived

An image processing server for easy resizing and modifying images on the fly

Image
0

2.3K

timoreymann/imageserver repository overview

imageserver

GitHub Release Docker Cloud Build Status

What is this?

An image processing server for easy resizing and modifying images on the fly

Requirements

To run it you need GraphicsMagick, ImageMick, Python 2.7 and Node 8+ installed

How to use?

Configuration

You can place a config.json in the project directory to customize the configuration of imageserver

{
    "port": 3000,
    "timeout": 10000,
    "localImageFolder": "localImages",
    "maxDimension": 4000
}

The defaults for processing are defined via environment variables, you can find a reference at the graphicmagicks documentation, the following are overriden:

MAGICK_LIMIT_DISK=300M -> Maximum file size
MAGICK_LIMIT_MEMORY=2G -> Memory limit
Run with node on host/local machine
npm install
npm run server
Using docker-compose
version: '3.2'
services:
  imageserver:
    image: timoreymann/imageserver
    restart: always
    ports:
      - 3000:3000
    # Optional, if you would like to change some config, 
    # please keep in mind that port changes also affects docker port bindings
    volumes: 
      - /opt/imageserver/config.json:/app/config.json
      # Optional, if you would like to use localImages you can easily mount them into the container,
      # this can be a network share or whatever
      - /opt/imageserver/local:/app/localImages

Technical details

Under the hood

... it simply downloads the image you would like to process, applies the modifications using GraphicsMagick and returns it back, so you can simply use it in web applications and Co.

Known Limitations

  • Very big files can maybe block the service
  • to scale you may consider loadbalancing this service because of nodejs threading model
  • Works only with images avaiable to application without authenticating, may be blocked by specific providers

Whats next?

  • Docker Image
  • Dummy images
  • Support for local images?

Wanna contribute?

Simply write a ticket or submit a pull request, if you have any problems or questions you can also write me an mail ;)

Tag summary

Content type

Image

Digest

Size

258.2 MB

Last updated

almost 6 years ago

docker pull timoreymann/imageserver