Skip to content

Instantly share code, notes, and snippets.

@chuckreynolds
Last active October 6, 2023 09:01
Show Gist options
  • Save chuckreynolds/35bcec4323d314a7fff5a1d3fcd357bd to your computer and use it in GitHub Desktop.
Save chuckreynolds/35bcec4323d314a7fff5a1d3fcd357bd to your computer and use it in GitHub Desktop.
Local NGINX WordPress Media Uploads Fallback. Substitute {PROD} for the domain to use images from.
location ~* ^.+\.(svg|svgz|jpg|jpeg|gif|png|ico|bmp)$ {
try_files $uri @image_fallback;
}
location @image_fallback {
proxy_pass http://{PROD};
}
@chuckreynolds
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment