Try Now
More in this section

Forums / Bugs & Issues / Images don't always resize

Images don't always resize

2 posts, 0 answered
  1. Will
    Will avatar
    23 posts
    30 Jun 2009
    13 Jan 2010
    Link to this post
    We have developed a custom module for a client and it's turned out great. Unfortunately, there is an issue that occurs infrequently, but when it does, it ruins the entire page. We have pictures of puppies for sale and using the Images & Documents module, we display resized thumbnails and preview pictures for each puppy. The original pictures are as large as 3264x2448, maybe more. The problem is, sometimes a picture will not resize. We are using the query string to set a max width and height. While this worked 100% of the time in our test environment with fewer and smaller sample images, it absolutely failed in production, where we already had over a 100 images added of varying sizes. If we displayed 10 puppy thumbnails at once, it would only take one failed resize to ruin the page.

    Here is a sample image to try:

    Note, this does NOT fail unless you try refreshing, and keep trying, until it comes in at full size. On the day of launch, all of our pictures were this big and the problem would happen a lot. Since then, we've done a true resize of the pictures to 800x600, and the problem has not happened again. We did this by editing the image properties in Sitefinity. I had to re-add this test image, but it works most of the time. Last week it would not work maybe every 1 in 10 tries. Today it took a LOT of refreshes to get it to fail.

    Today the client has to make sure they are either adding smaller photos, or they must resize the photo manually in Sitefinity to prevent this issue. I'm looking for help determining why this is occurring, and what the best solution would be that allows the client to add photos of any size. One thing I've already tried is simplifying the query string to just the width and height, and re-ordering the parameters. All that's worked though is actually resizing the photo to a smaller dimension. The original pictures were about 1.8MB in size. We need to display as many as 10 thumbnails at once.

    EDIT: The version is 3.6 SP2.

    Thanks in advance,
  2. Georgi
    Georgi avatar
    3583 posts
    10 Oct 2016
    15 Jan 2010
    Link to this post
    Hi Will,

    I am sorry to hear that you are having problems with the images.

    We were trying to reproduce the issue with the image you provided, but after two days - still nothing. I spent some time in thinking how this could happen though. Is there any chance that you have the full size images cached in the browser, and occasionally the cached image is loaded rather than the resized one, which should come from Sitefinity?

    Could you please try to set cache expiration date for your images, we are having some issues in the current version, that not all the images are cached on client side with the default setting. Then, please observe for the behavior again, and let us know if you face the issue. Screenshot of the expire date is attached. 

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered