Public | Automated Build

Last pushed: 3 days ago
Short Description
HTTP image resizer
Full Description



docker run -ti --rm -p 8000:8000 bulv1ne/imageresizer
# OR as a daemon
docker run -d -p 8000:8000 bulv1ne/imageresizer

Then visit the url:

Nginx proxy cache

proxy_cache_path /data/nginx/cache keys_zone=img_resize:100m max_size=1g inactive=30d;

server {
    listen 80;

    location /resize {
        proxy_pass; # The running docker container
        proxy_cache img_resize;
        proxy_cache_key $request_uri;
        proxy_cache_valid 30d;
        proxy_hide_header Set-Cookie;
        proxy_ignore_headers "Set-Cookie";
        expires max;
        add_header Pragma public;
        add_header Cache-Control "public";
        add_header X-Proxy-Cache $upstream_cache_status;

    # ... more location configuration

Then the new url will be:

First time it will load as slow as usual, second time it will return the cached response.

More info:

Docker Pull Command
Source Repository