Developer forum

Forum » Templates » GetImage.ashx occasionally returns empty image

GetImage.ashx occasionally returns empty image

Jan Schultz
Reply

Hey,

I sometimes experience product images not being loaded correctly, the result is an empty image 0x0px in size (The .ashx handler does not throw an error).

This seems to happen at random, with no pattern as to which images it affects. An image can be fine in one size (e.g. thumbnail), but not in another size (e.g. mini-thumbnail, high-res version, etc.)

I have set the handler to cache for 48 hours, and this empty image is also cached. If i delete the cached image, the handler will return the correct image.

I have noticed this weird behavior on both of the following queries:

/Admin/Public/GetImage.ashx?Image=/Files/Images/XPI/[FILENAME]&Width=200&Height=200&Crop=5&Compression=85

/Admin/Public/GetImage.ashx?Width=540&Height=540&Crop=5&Compression=100&Image=/Files/Images/XPI/[FILENAME].jpg

e.g.

/Admin/Public/GetImage.ashx?Width=540&Height=540&Crop=5&Compression=100&Image=/Files/Images/XPI/dd922c91-01ca-4c7f-a185-50113ad08b5e.jpg

 

Does anyone know of a solution to this?

 

 


Replies

 
Nicolai Høeg Pedersen
Reply

It can be many things - but it should not leave an empty image in the cache. You should write to the service desk with a full URL so they can look at the event viewer on the server if they can see what is wrong - and if it is a bug, get it fixed.

BR Nicolai

 

You must be logged in to post in the forum