0

Adding blur to picture

I am using a JS code to change a low res picture to a high res version. how can i add a blur filter to the low res version only? here is the javascript code. <!--Script to change all img src to data-src --> <script> window.addEventListener('load', function() { var allimages = document.getElementsByTagName('img'); for (var i = 0; i < allimages.length; i++) { if (allimages[i].getAttribute('data-src')) { allimages[i].setAttribute('src', allimages[i].getAttribute('data-src')); } } }, false) </script> the html <img src="/image-blr/logo-blr.png" class="card-img-top" alt="..." data-src="image/logo.png">

16th May 2020, 10:36 AM
Steven Taskin
Steven Taskin - avatar
1 Antwort
0
Angry Love but it will blur the high res picture too.
17th May 2020, 9:10 AM
Steven Taskin
Steven Taskin - avatar