I have a web page that displays a list of testimonials along with an <img>
tag beside each entry.
It looks like this:
<table>
<tr>
<th>
Name
</th>
<th>
Testimonial
</th>
<th>
Subject
</th>
</tr>
<tr>
<td>
Joe Blow
</td>
<td>
I had a great stay...
</td>
<td>
<img src="..." />
</td>
</tr>
...
</table>
Basically this can serve up to 100 entries at once and it freezes up the browser very often - particularly because I probably haven't totally optimized all the imgae file sizes and some of them are more than 1MB.
What I would like to find out is how I can make it so the <img>
tag doesn't render into the browser until the end-user scrolls and it becomes visible in their viewport.
This would save a lot of cost on my server and also not freeze up all my user's browsers.
Anybody have any ideas?