I'm using a location config like this in Nginx for serving WEBP when the user supports it
map $http_accept $webp_suffix { default ""; "~*webp" ".webp"; } server { #... location ~* \.(?:jpg|jpeg|png|webp)$ { root /usr/share/nginx/html; try_files $uri$webp_suffix $uri =404; } #... } my problem is that I want to use the same strategy but when I'm using an object-storage (Minio - S3 compatible)
so I'm wondering what is the best way to replace this part:
try_files $uri$webp_suffix $uri =404; with something like
try_proxy_pass http://minio$uri$webp_suffix http://minio$uri =404;
proxy_passto an object storage provider? That will negate most of the benefits of using object storage provider, because all the requests for images have to still go through your server? Also,image_filteris a filter running on your nginx server. It cannot do anything to the images in object storage.