How to improve the thumbnail quality on imported on the video collections library - Squarespace 7.1
The video collections are making the thumbails, however Squarespace is pulling through a low resolution image. By using the following code, you can bring through a higher resolution image, improving the output of the site.
Add the following to your Code Injection - Footer
<script> window.addEventListener('DOMContentLoaded', () => { const images = document.querySelectorAll('img.grid-item-image'); images.forEach(image => { const src = image.getAttribute('src'); if (src.includes('295x166')) { const newSrc = src.replace('295x166', '1080'); image.setAttribute('src', newSrc); } }); }); </script>