<p>I <em>think</em> you should be able to do this with the <a href="https://plugins.craftcms.com/retcon" rel="nofollow noreferrer">Retcon plugin</a></p>

CC BY-SA 4.0
2022-01-12T12:26:45.360Z
Thank you! Will take a look.
Emma Swann
CC BY-SA 4.0
2022-01-12T12:11:00.180Z
2022-01-12T12:11:00.180Z
James Smith
<p>I have thousands of imported entries which have HTML image embeds to files which no longer exist. Is there a way to use the replace function in the tag to say replace <code>&lt;img src=&quot;[variable different every time]&quot;&gt;</code> with nothing?</p>
<p>Would prefer if possible not to have to edit each entry, but not have broken image tags on the pages.</p>

<templating><replace>
Replace HTML string in body tag?
# Replace HTML string in body tag?

(Asked by: username_0 on 2022-01-12)

I have thousands of imported entries which have HTML image embeds to files which no longer exist. Is there a way to use the replace function in the tag to say replace `![]([variable different every time])` with nothing?

Would prefer if possible not to have to edit each entry, but not have broken image tags on the pages.

**Tags:** templating, replace

---

## 1 answers

### Answer by username_1 on 2022-01-12. Score: 1

I *think* you should be able to do this with the [Retcon plugin](https://plugins.craftcms.com/retcon)

> **Comments:**
> **username_0**: Thank you! Will take a look.  

---

