Specifically, the proxy times out in the middle of displaying the image if any of the following are true:
- More than 3 seconds have elapsed since the image data first started being downloaded.
Hm, that may be the problem... The 3 second timeout seems too short for an internet transfer of up to 3 MB.
My images are about 100-200 kB at most. I use the department's HTTP server that has to fetch the file from the department's NFS and then send it out through the internet connection shared by the whole university. It is a very broad connection that is usually fast enough, but sometimes it does take a few seconds to complete.
I presume that there may be delays also at the proxy's end if it gets too many image requests at the same time. This forum must have thousands of readers, the average page has dozens of images, the proxy may be used by many other services...
The broken/truncated image problem is VERY common and is not specific to my images. (The creator of that thread posts automatically generated charts every hour. After the proxy was enabled sometimes his chats are broken, rather randomly. )
But the problem is not reproducible, and the same image may be truncated at different places, or not at all, when the page is refreshed.
In any case, if the proxy fails it is better to display "invalid image" than a truncated image. The latter confuses readers, e.g. if the plot shows but the labels at bottom are cut off.