I'm displaying images from the National Parks Service API for a web app and the images displaying in the thumbnails are causing a lot of lag.
Is there a way to compress image urls before displaying or reduce the lag somehow?
The code below is how the images are displayed.
for (let j = 0; j < parkInfo.data[i].images.length; j++) {
$('#pics').append('<img src="' + parkInfo.data[i].images[j].url +
'" width="33%" altText="' + parkInfo.data[i].images[j].altText +
'" class="img-thumbnail">');
Example image:
How the images are displayed currently: