I am trying to set up lazy loading for the images on my site but currently, any image added via Redactor lacks the necessary 'lazyload' class.

Is there any way to configure Redactor to automatically add this class to any image added through Redactor? I have been digging through the documentation on their site and doing some googling but so far haven't found anything.

1 Answer 1


Found this plugin doing some digging https://github.com/mmikkel/Retcon-Craft. It looks like it can achieve what you need - appending existing attributes (including class names) by applying a filter to your Redactor field in your Twig template.

  • Thanks, Kelly. I was hoping there was a config option for Redactor so I wouldn't have to rely on another plugin but I don't think I am going to find that so I will definitely look into this.
    – muddygrey
    Feb 18, 2020 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.