By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,992 Members | 967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,992 IT Pros & Developers. It's quick & easy.

Resize images on demand or once?

P: n/a
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

Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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 ---
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

Nov 19 '05 #2

P: n/a
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
Rick Strahl [MVP] wrote:
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 ---
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


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.