ImgWizard is a small server written in Go as faster alternative for thumbor
- Fetch image from local file system or remote media
- Resize it
- Crop it
- Change quality
- Cache resized image to file system and get it on next request
- Return WebP images if browser supports it
http://{server}/images/{storage}/{size}/{path_to_file}
- server - imgwizard server addr
- mark - mark for url (can be used for nginx proxying)
- storage - "loc" (local file system) or "rem" (remote media)
- size - "320x240" or "320x" or "x240"
- path_to_file - path to original file (without "http://")
http://192.168.0.1:4444/images/rem/462x/media.google.com/uploads/images/1/test.jpg
VIPS is a free image processing system. Compared to similar libraries, VIPS is fast and does not need much memory, see the Speed and Memory Use page. As well as JPEG, TIFF, PNG and WebP images, it also supports scientific formats like FITS, OpenEXR, Matlab, Analyze, PFM, Radiance, OpenSlide and DICOM (via libMagick). (© vips wiki)
$ brew install vips
$ sudo apt-get install libvips-dev
Check this
go get github.com/shifr/imgwizard
export PATH=$PATH:$GOPATH/bin
if you haven't done it before
imgwizard
- run server without restrictions
You will see "ImgWizard started..."
Check imgwizard work after server start
imgwizard -l localhost:9000 -c /tmp/my_cache_dir -m media1.com,media2.com -s 100x100,480x,x200 -q 80 -mark imgw -thumb /path_to_404_image.jpg
- -l: Address to listen on (default - "localhost:8070")
- -c: directory for cached files (default - "/tmp/imgwizard")
- -m: comma separated list of allowed media (default - all enabled)
- -s: comma separated list of allowed sizes (default - all enabled)
- -q: resized image quality (default - 80)
- -mark: mark (default - images)
- -thumb: default image if requested doesn't exists (default - /tmp/404.jpg)
Yes, a lot.