                 }
                        });
                    });

                    lazyImages.forEach(img => imageObserver.observe(img));
                } else {
                    // Fallback for browsers that don't support IntersectionObserver
                    lazyImages.forEach(img => {
                        img.src = img.dataset.src;

                        img.onload = () => {
                            img.classList.add('loaded');
                        };

                        i