locked
Images for website - how to save the files RRS feed

  • Question

  • User-1014039493 posted

    Hi,

    I am working on a Real-estate website for a client. I was wondering, what's the best way to save the images. 
    At the moment i create thumbnails and four other sizes per orginal image. Is it recomended to save in db or keep real files? Traffic is high.

    Thanks for any help.

    Regards!

    Monday, August 8, 2011 11:15 AM

Answers

  • User541108374 posted

    Hi,

    save them on disk and only keep a reference in the database to the path.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 8, 2011 11:17 AM
  • User692200542 posted

    Images could be stored in both ways:

    1. By Taking The Column type as binary in the database and converting image into binary and saving it
    2. By Taking the image path and storing it in database and retriving the image using th path through your code

    The best way which i would suggest you is the second. It will consume less bandwidth and make your transactions faster

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 9, 2011 8:48 AM
  • User-581386078 posted

    Save the resized images and the original on the disk. Don't forget to save the original in case your file size requirements ever change and also don't forget to set proper caching headers in IIS so that proxies and what not can take some of the load from the server. Optional serve the media from a cookieless domain (e.g. http://images.mydomain.com) to cut down on even more traffic.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 9, 2011 10:21 AM

All replies

  • User541108374 posted

    Hi,

    save them on disk and only keep a reference in the database to the path.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 8, 2011 11:17 AM
  • User692200542 posted

    Images could be stored in both ways:

    1. By Taking The Column type as binary in the database and converting image into binary and saving it
    2. By Taking the image path and storing it in database and retriving the image using th path through your code

    The best way which i would suggest you is the second. It will consume less bandwidth and make your transactions faster

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 9, 2011 8:48 AM
  • User-581386078 posted

    Save the resized images and the original on the disk. Don't forget to save the original in case your file size requirements ever change and also don't forget to set proper caching headers in IIS so that proxies and what not can take some of the load from the server. Optional serve the media from a cookieless domain (e.g. http://images.mydomain.com) to cut down on even more traffic.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 9, 2011 10:21 AM