Stephen Bain wrote:
John R. Owens wrote:
I don't know if this might have ever been suggested before already, but perhaps a change in software could allow us to set a maximum image size in our user preferences? Either in width/height, e.g. "always shrink images to less than 200 pixels wide or 150 pixels high, whichever is smaller", or in kB, e.g. "always shrink images to less than 10 kB".
Unfortunately I don't think this would be a workable solution, unless a thumbnail duplicate of every image was created at the time of uploading. That would be fairly straightforward to do, although it would be very resource intensive on the image server(s). (Is there more than one yet?) To shrink each image after every request before sending to the browser would literally kill the servers.
This is wrong in a few ways. Image scaling works as follows. On render, the apache server checks if a thumbnail image already exists, via NFS. If it doesn't, or if the full-sized image is newer than the thumbnail, it retrieves the image over NFS, scales it using ImageMagick, and then saves it back to the the image server over NFS. Although it's not done on upload, it's only ever done once for a particular image/size combination. Image scaling is not a major strain on the cluster, and I don't think this feature would make it one. However, there is a minor performance problem with it, which is that different HTML would have to be generated for users with this feature enabled. That would reduce the parser cache hit ratio.
And you can't literally kill something that's not literally alive :)
A better way would be to allow for a user preference to have images either on or off by default, but have a link on the page to view a version with images. So if a user browsing with images off wanted to see an image, they could then re-load the page with images included. (If it's good enough for Outlook, then it's good enough for Wikipedia.)
I think that would be better done on the client side. Internet Explorer is better in this respect than Firefox or Mozilla, with a "show image" context menu item and, in some versions, a "show images" toolbar icon. I'm sure there are other browsers with similar features to IE. To do it on the server side would require reducing the parser cache hit ratio.
-- Tim Starling