Topic on Project:Support desk

198.84.240.164 (talkcontribs)

I am trying to display a decorative image that does nothing when clicked on. I have tried to code it as

[[File:image.png|50px|link=|alt=]] 

By leaving the link attribute blank I can successfully do this until the next time the page is edited. When the edit button is pressed the code automatically changes and the image links to its image page.

Any suggestions?

88.130.106.95 (talkcontribs)

The syntax with empty link and alt attributes is OK. It is what also is recommended on en:Wikipedia:Picture_tutorial:

A purely decorative image, which conveys no information and does nothing when it is clicked on, can be specified with an empty alt attribute. For example [[File:Flag of the United States.svg|20px|link=|alt=]] generates a flag that is purely decorative.

I just tried editing a WP page that way and the syntax has not been changed. For pages in Wikipedia this problem does not seem to exist...

Do you have an idea, why the page code is changed for you?

198.103.104.11 (talkcontribs)
198.103.104.11 (talkcontribs)

Apologies for the repeat.

While the code works in Wikipedia, it does not in my MediaWiki page. Attached is my product version:

Product Version 
MediaWiki 1.19.7 
PHP 5.3.15 (cgi-fcgi) 
MySQL 5.1.63-community-log 

Once again, as soon as I click return to the edit screen, the code automatically changes to

[[Image:image.png|50px|image.png]]

I'm assuming the problem is the WYSIWYG editor. Is there any way to bypass this automatic change with code?

88.130.102.163 (talkcontribs)

Can you verify that it's in fact the WYSIWYG-Editor, which is cuasing this issue? You can e.g. do that by temporarily disabling it in LocalSettings.php and testing, if the problem does not appear anymore then.

Reply to "Image with no link"