Resize images on demand or once?

  • Thread starter Thread starter J'son
  • Start date Start date
J

J'son

Guys,

I have built an application for a client that allows people to list
their products for sale along with a photo of the product. If the photo
is too big, I currently resize it down when the image is uploaded and
store it in the database.

My client now thinks the images are too small and needs to be resized.
I can change the resize height/weight (settings in web.config), but
since the resize happens only once on upload - all the users will have
to readd their respective photos to their products to get the new size.

I only show about 20 - 30 products at a time on the website. Is it that
much of a performance hit to store the original photo and resize it on
demand instead. NOTE: I capped the total photo size at 25K so I won't
have space issues.

Thanx!

J'son
 
Hi J'son,

It entriely depends on your application. If you have no scalability issues
at this point and are far off from anyhing pushing you into a corner, then
certainly dynamic image generation is a possibility. Dynamic image
generation is pretty resource intensive, so under load this can quickly
become a problem. However, you can use short-term caching to deal with heavy
load scenarios as long as your image size is small enough.

All that said - drastically slower, still is fast. If you're running a
dedicated box I don't think you'll have any issues. It's more of an issue in
a shared server environment or a super heavy use scenario.

+++ Rick ---
 
Thanx Rick.. yes, it is a dedicated box and I do use caching for the
dynamic images. I think resize on demand is the way to go, given my
client's potential to change his mind about photo sizes.

Thanx again,

J'son
 
Back
Top