Adam Vigh
Adam Vigh

Reputation: 1250

ASP.NET MVC - Displaying large amount of images

Currently we have a page, where people can amend (crop, resize, etc..) images they have uploaded into the system. Everything works fine, but we have to improve the performance, especially the page load, so I'm looking for some advice.

The problem is that on our page, we have to display around 70-80 images. The source of all the images () are set to point to a Controller method, as we have some special rules in place to build up the full path of the images. (no DB calls are made there)

Obviously, this results in many calls to retrieve the images, which's ok up to a point, but after a while, it just becomes slower and slower.

So the questions is: What would be the best way to go about handling such a scenario?

Would it make any difference if instead of a Controller method we would use an HttpHandler to return the images?

Any input is greatly appreciated.

Upvotes: 0

Views: 667

Answers (2)

Tomq
Tomq

Reputation: 1125

You can use images lazy loading plugin for jquery.

example: http://www.appelsiini.net/projects/lazyload

Upvotes: 3

paul
paul

Reputation: 22021

can you stitch the images together at the server, transmit them as a single ImageMap, then use CSS sprites (http://css-tricks.com/css-sprites/) on the page to display them?

Upvotes: 1

Related Questions