Retcon adds a collection of powerful Twig filters for modifying HTML.

Here are some of the things Retcon can do:

  • Add, remove, modify or rename attributes for multiple dom nodes matching the given selector(s) (for example, p:first-child, img, span.foobar etc)
  • Remove DOM nodes by selector (e.g. remove all span tags)
  • Remove everything but given selectors (e.g. remove everything except img tags)
  • Transform inline images (it even uses Imager, if installed)
  • Add srcset or lazyloading to inline images (for example, images embedded in Redactor fields)
  • Inject strings or HTML content
  • Change tag names for given selectors (e.g. change all occurrences of <h1> to <h2>)

Check out the Wiki for complete docs and examples.

Installation Instructions

To install this plugin, copy the command above to your terminal.

Reviews

This plugin doesn't have any reviews.

Active Installs
4,919
Version
2.8.2
License
MIT
Compatibility
Craft 3, Craft 4, Craft 5
Tested on Cloud
Last release
October 21, 2024
Categories
Activity (30 days)
2
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs