diff --git a/assets/js/image_expansion.js b/assets/js/image_expansion.js index 66cc379e..7bd6cb26 100644 --- a/assets/js/image_expansion.js +++ b/assets/js/image_expansion.js @@ -87,11 +87,12 @@ function pickAndResize(elem) { } const muted = store.get('unmute_videos') ? '' : 'muted'; + const autoplay = elem.classList.contains('hidden') ? '' : 'autoplay'; // Fix for spoilered image pages if (imageFormat === 'mp4') { elem.classList.add('full-height'); elem.insertAdjacentHTML('afterbegin', - `