Skip to content

Instantly share code, notes, and snippets.

@doginthehat
Created November 16, 2015 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doginthehat/8e30a211a5e79ea7f05b to your computer and use it in GitHub Desktop.
Save doginthehat/8e30a211a5e79ea7f05b to your computer and use it in GitHub Desktop.
Fix missing images
# For safe keeping
# From https://journalxtra.com/web-development/fix-missing-images-size-fits-replacement/
# Clever trick if you're working off a local dev copy and don't want to download all the media image to work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$
RewriteRule .* directory-path/replacement-image.jpg [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment