Page MenuHomePhabricator

Loss of 'alt' texts when manipulating image presentation form
Closed, ResolvedPublic


As an editor using VE within MediaWiki, I would like to be able to change the presentation form of an image (in this case from "thumbnail" to "fullsize") without loosing the "alt" text. I can provide the following example edit from OpenStreetMap wiki: It looks to me like a data corruption, because the original "alt" data is lost but there would be no need to change it. The HTML contains the filename as alt text for the image.
I would expect:

[[File:Openstreetmap.jpg|alt=This is some OpenStreetMap logo including the label "OpenStreetMap".]]

But I get:


Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Downstream report at:

Personally I never saw/could reproduce this on any Wikipedia/Wikimedia site…

I reproduced this in the MediaWiki wiki today:
Exactly the same issue.
It looks to me as if images of type basic do not store alt texts at all.

Change 499805 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/VisualEditor@master] MWInlineImageNode: don't discard alt text when serializing

Change 499805 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] MWInlineImageNode: don't discard alt text when serializing