Acties

Home Acties
window.addEventListener('load', function () { window.responsiveResizeObserver = new ResizeObserver((entries) => { entries.forEach(entry => { const imgWidth = entry.target.getBoundingClientRect().width; entry.target.parentNode.querySelectorAll('source').forEach((source) => { source.sizes = Math.ceil(imgWidth / window.innerWidth * 100) + 'vw'; }); }); }); document.querySelectorAll('[data-statamic-responsive-images]').forEach(responsiveImage => { responsiveResizeObserver.onload = null; responsiveResizeObserver.observe(responsiveImage); }); });

Acties en events