`nginx` setup to return files with different file extensions
# Allow .jpeg to be requested with .jpg
location ~ (.+).jpg(.*) {
try_files $uri $1.jpeg$2 =404;
}
This will try to find the .jpg first, then see if there’s a matching .jpeg instead; if neither, return a 404.