// Select all images in the "gallery" class const images = document.querySelectorAll('.work img'); // Loop through each image and add the loading attribute images.forEach(image => { image.setAttribute('loading', 'lazy'); });