0

I have an asp repeater which displays all my images as small thumbnails. The load times are becoming ridiculous because in some of the folders there are 3000+ images. Is there a way i can keep my existing code and use lazy loading? I've tried a couple things but they do not work, one of them involved changing my <img src> to <img data-src> which is not acceptable in this case.

<asp:Repeater ID="Thumbnails" runat="server">
<img id = thumbImages
src='images/thumbs/<%#Eval("FileName") %>'
alt='images/<%#Eval("FileName") %>'
height="100"
width="150"
class="imageCount"/>
<asp:Repeater>

rychrist88
  • 643
  • 6
  • 14
  • What do you mean by lazyload in this scenario? Are you displaying all of the images at one time on the same page? What about implementing paging? – Seano666 Apr 05 '16 at 20:57
  • @Seano666 paging looks like a good alternative but i've never used it and the majority of examples i'm finding online use an SQL DataSource and gridview, none of which i'm using. If you could point me to an example that doesn't use a datasource or gridview i'll try it out – rychrist88 Apr 06 '16 at 13:56
  • @BenPetersen i'll attempt what was posted as an answer, but i have tried a similar method and all my images appeared as broken links – rychrist88 Apr 06 '16 at 13:57

0 Answers0