Building Dynamic gallery with Lazy Load

I’m looking for a cleaner way to load images in a php website html 5 css 3. I have spent the last few days looking at Lazy Load with jQuery and jQuery AJAX load() Method - W3Schools. There are so many results on the net but which way is the best?

I am building a WordPress website for an artist site I will be displaying a large number of images in multiple categories. I use Bootstrap 4