Skip to content

Instantly share code, notes, and snippets.

@fugudesign
Created May 22, 2018 21:44
Show Gist options
  • Save fugudesign/6fb0e8e93922185d260d71805844832d to your computer and use it in GitHub Desktop.
Save fugudesign/6fb0e8e93922185d260d71805844832d to your computer and use it in GitHub Desktop.
Regex to match only Wordpress original images (no generated thumbnails)
^(?!.*-[0-9]{1,4}x[0-9]{1,4}).*\.(?:jpe?g|gif|png)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment