=> {
                        entries.forEach(entry => {
                            if (entry.isIntersecting) {
                                const img = entry.target;
                                img.src = img.dataset.src;

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

                                img.onerror = () => {
                                    // Set appropriate fallback image base