DONE. image render service

This service can be used to render any http/http sites to images / pdf.

Endpoints

/img

Renders an url with slimmerjs (firefox)

Required parameters:
- url: urlencoded(!!!) url, which marks the target site
- w: desired width
- h: desired height
- type: output type (valid values are: jpg, png, pdf)
- quality: in case of jpg, png this one marks the quality

Optional parameters:
- timeout (optional): resource timeout in ms
- globaltimeout (optional): timeout for the global pageload (always makes screenshot after globaltimeout - set timeout to lower value to prevent screenshot when page cannot be loaded, html is also a resource)
- resize (optional): for jpg/png you can down/upscale the images
- cropx (optional): the width of the crop (in px)
- cropy (optional): the height of the crop (in px)
- croptop (optional): the top of the crop (in px)
- cropleft (optional): the left of the crop (in px)
- htuser (optional): htpasswd username
- htpass (optional): htpasswd username

Example

/img?url=http%3A%2F%2Fthisisdone.com&w=1000&h=1000&type=jpg&quality=50%&resize=50

Docker

Running the docker image can work with default parameters, the 3002 port is used inside the container (can be redirected with -p 8080:3002). The default parallel worker count is the cpu core count, can be set using env value slimmercount (in docker -e slimmercount=2).