locked
Dealing with thumbnail generation in a gallery RRS feed

  • Question

  • User-1219224268 posted

    Hi All,

    At the moment I have a fairly simple gallery system on my site. I generate thumbnails in the gallery by simply setting the width property on my databound images and it shows them in a datalist and keeps the proportion (brilliant!).

    However, this only rescales the size and can casue slower loading. Rather than having to upload a separate thumbnail is there anything I can do to speed up the loading of images?

    Many thanks,

    Joe

    Wednesday, July 23, 2008 11:43 AM

Answers

All replies

  • User494352855 posted

    Yep. Let the server do the work :)

    Here's a component that will resize the images server-side... it will handle all the resizing work for you.. just add ?thumbnail=jpg&maxwidth=60 (or whatever) to your image paths...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 6, 2008 4:26 PM
  • User-1219224268 posted

    Hi Nathanael, thanks for posting that, looks good.

    Thought I might just ask you a couple of questions about it if you don't mind?

    I mainly work on shared hosting environments for deployment, do you think this would pose any issues?
    Could I use this to modify images being uploaded to lower the resolution of files? (I work in VB so not sure how much control I have.)
    Can I use this on multiple/commercial projects when purchased?

    Sorry if some of this is covered on your site, I only had a chance to skim through.

    Cheers,
    Joe

     

    Thursday, October 9, 2008 12:16 PM
  • User494352855 posted
    I use it fine on discountasp.net. I wouldn't worry about shared hosting causing problems... the cached image files are tiny, and the performance is very good. The only thing you might run into is your host blocking filesystem writes from your app completely. If they do that, I'd suggest a different host... There is an easy way around though, you just have to use the shared temp directory instead. If you do any kind of writes now you should be fine. You're welcome to modify the source any way you see fit... Although I think the resize-on-demand approach has a lot of points over the resize-on-upload :) It's a developer license, so you can use it on multiple projects. Let me know if you have any more questions. Regards, Nathanael Jones
    Thursday, October 9, 2008 12:26 PM