<p>The RegEx is only the URI part; so something like <code>(.*.png|.*.jpg)</code> is probably what you want.</p>

CC BY-SA 4.0
2019-04-13T02:03:08.757Z
That worked a treat, thanks Andrew!
Stephen
CC BY-SA 4.0
2019-04-12T23:10:14.203Z
2019-04-12T23:10:14.203Z
andrew.welch
<p>The Retour plugin has this setting: <em>Exclude Patterns - Regular expressions to match URLs that should be excluded from Retour.</em></p>

<p>How would I exclude images (jpg and png) from being handled by Retour? My statistics are full of 404s from old Asset transforms that I used before switching to the Imager plugin.</p>

<p>I tried adding this (which I found here: <a href="https://regexr.com/2ukfb" rel="nofollow noreferrer">https://regexr.com/2ukfb</a>): <code>(http:\/\/[0-9a-zA-Z\.\/_-]+.png|http:\/\/[0-9a-zA-Z\.\/_-]+.jpg)</code></p>

<p>But that didn't seem to work. Images with a 404 were still logged in the Statistics section of Retour. Thanks in advance for any help.</p>

<regex><plugin-retour>
RexEg Pattern to Exclude Using the Retour Plugin
# RexEg Pattern to Exclude Using the Retour Plugin

(Asked by: username_0 on 2019-04-12)

The Retour plugin has this setting: *Exclude Patterns - Regular expressions to match URLs that should be excluded from Retour.*

How would I exclude images (jpg and png) from being handled by Retour? My statistics are full of 404s from old Asset transforms that I used before switching to the Imager plugin.

I tried adding this (which I found here: <https://regexr.com/2ukfb>): `(http:\/\/[0-9a-zA-Z\.\/_-]+.png|http:\/\/[0-9a-zA-Z\.\/_-]+.jpg)`

But that didn't seem to work. Images with a 404 were still logged in the Statistics section of Retour. Thanks in advance for any help.

**Tags:** regex, plugin-retour

---

## 1 answers

### Answer by username_1 on 2019-04-12. Score: 2 | Accepted answer

The RegEx is only the URI part; so something like `(.*.png|.*.jpg)` is probably what you want.

> **Comments:**
> **username_0**: That worked a treat, thanks Andrew!  

---

