strues/retinajs

How to re-initialize script on already processed images?

dgobnto opened this issue · 2 comments

If you're using such plugins like Fondation's Interchange, an image might be replaced on the fly, after screen size change.

The data-rjs-processed="true" attribute will then prevent any previously processed image from being processed again (even if they are now new unprocessed images).

Is there any option to re-initialize retinajs on already processed images?

Thanks

  • Retina.js: 2.1.2

I have had this issue in 2017 and now again, with a new project.

Is there any native method to re-process previously processed images?

Thank you.

@dgobnto: If you can detect the change you just need to call the function window.retinajs() and the script will be launched again. This also happens when you have a single page application.