Last modified: 2012-04-12 13:53:36 UTC
When I enter [[File:Something.png|200px]], if Something.png exists, everything does well; if it doesn't exist, a link to Special:Upload is generated. However, the link text is 200px, neither File:Something.png nor something meaningful, which may get people confused.
The problem here is the width parameter is only relative to images. When the file handler is returned for an image it adds an additional regex match for parsing the parameters (to handle the "[0-9]+px" parameter and thus remove it from the parameter section and thus preventing it being applied as a label). However since the image does not exist the handler is empty and the width regex match isn't added to the MagicWordArray. Any recommendations on the best way to handle this? Attempt to guess if the missing file should be an image? Or should we add the width parameter to the default regex list?