Configure Nginx
To continue configuring server-side image resizing, you must prepare the nginx.conf
file and provide a proxy_pass
value for your chosen adapter.
To enable Nginx to resize images:
-
Install the Nginx image filter module.
load_module /etc/nginx/modules/ngx_http_image_filter_module.so;
-
Create an
nginx.conf
file based on the included templatenginx.conf.sample
file. For example:location ~* \.(jpg|jpeg|png|gif|webp)$ { set $width "-"; set $height "-"; if ($arg_width != '') { set $width $arg_width; } if ($arg_height != '') { set $height $arg_height; } image_filter resize $width $height; image_filter_jpeg_quality 90; }
-
[Optional] Configure a
proxy_pass
value for your specific adapter.
Previous pageAWS S3 bucket
Next pageRemote storage for cloud