I have not been able to reproduce the issue using the following:
- Attachment created using a prefix that contains at least 1 '
- Including that attachment on a page by passing it as an argument to a template parameter
- Using that attachment as the icon for a page
By looking at the code that is related to whether FILE appears as an image or not, this seems more related to the metadata that is generated for the image when it is saved -- when checking the title-cache during the FILE render:
Does the cache contain the file type of the attachment?
- If yes: Is the file-type an image type that the browser can render inline?
- If yes: Render the attachment. STOP.
- If no, then:
- If no: Does the file type have an icon defined?
- If yes: Render the file-type icon. STOP.
- If no: Render the attachment as a link.
If it was metadata related, then the expectation is that the issue would occur whether you used it in a template or not.
However, I have not been able to get my metadata into a state where only a link renders. Are you able to reproduce the issue consistently with other attachments? If not, perhaps it is related to the History of the affected image. I cannot see the History as a guest. What does it contain?