In this video is explain how I managed to add lazy loading images in Vue.js while getting image data from the headless CMS Prismic.

In this case it’s not just a matter of creating a Vue component as I also get images rendered in HTML from the Prismic Rich text field.

This is a lazy loading solution for images that works both in vanilla JS and Vue.

Find the code here: