Firstly, the problem I identified on my homepage is that the images make my webpage laggy. I found this article which explained about how to lazy load an image and to me this is a solution to my problem.
However, all the examples relate to the image being fetched using HTML. I fetch my image from my local files using CSS. How can I lazy load my images using CSS for my homepage?
Example of me fetching my image using CSS
background: -webkit-gradient(linear, left top, left bottom, from(rgba(50, 58, 82, 0.8)), to(rgba(50, 58, 82, 0.8))), url(../images/world.jpeg);
background: linear-gradient(to bottom, rgba(50, 58, 82, 0.8), rgba(50, 58, 82, 0.8)), url(../images/world.jpeg);
Here is my GitHub repo if you need to look at any of my website code.