Images
Tue, 2007-08-07 21:20 — admin
Our web site allows to add images to articles or forum topics. There are a few points to remember:
- You have to submit the text message first. Only then can you add images as a second step by clicking on the Images command at the top. (You can submit an incomplete text first, then add images, then edit the text though.)
- You cannot add images to a comment or a reply, but you can add them to the original article at the top, e.g. to a forum topic.
- Don't use fancy image filenames. Letters, preferably lower case, and numbers and the underscore character will certainly work. Spaces can cause problems for some users. Other characters may cause more severe problems. For example, an apostrophe (') or an ampersand (&) in the file name will cause an error message on the user's browser and will spoil functions like click-to-enlarge and the gallery.
- There seems to be a defect in the system that produces errors when confronted with pictures larger than about 2,000 pixels in one dimension. If you get an error, you have to reduce the image to below 2,000 pixels before uploading. It is better to reduce the longer side to 800 pixels, because then the CMS doesn't have to reduce again, which would lead to a somewhat poorer image quality.
Technical background: The special characters problem is a flaw in the CMS (Content Management System) we are using. I have filed a bug report for it, but it won't be fixed instantly or may not be fixed at all. I also try to fix such a problem when I see it, available time permitting.
Since 2007-10-07 there is no need any more to reduce the size of the images, because our CMS now does that automatically. After uploading you can see a message at the top, telling you to which size the picture has been recompressed.
Hans

Apostrophes
Ever since I spent a long time a couple of years ago discovering why something wouldn't work in ArcGIS (the reason was an apostrophe in a file or directory name), I've formed the habit of using underlines (_) instead. Suspect that if an industry standard like ESRI's GIS software doesn't like apostrophes, then there are probably a lot of other programmes as well.
Thx, Hans, for the guidelines.
_________
HC
It's still a defect in the software.
Of course the software shouldn't accept data that it then cannot handle. It is clearly a defect in the software, both here and in ArcGIS (unless it's clearly stated in the documentation---then it would be a weakness or a flaw). I'm saying this so nobody puts the blame on himself, which would be totally unfounded.
But that doesn't help us. Until the makers fix it, we have to use workarounds, the obvious one here being to avoid special characters in filenames.
What is almost universally guaranteed to work is lower case letters, digits, and the underscore. What will likely work is upper case letters (though there is a huge difference between Windows and Unix/Linux here; Windows considers them the same, while the others differentiate) and the hyphen. What may cause problems here and there is the space character (often has to get special treatment, like encoding as %20), and what can cause all kinds of problems is other special characters, which often have special meanings and functions.
Since I've filed a bug report on this for the Node Image module, there's a fair chance that we'll get this fixed here, but don't hold your breath. We have an even better chance to get automatic picture size reduction, which, I believe, is already in the current development version.
Hans