Page MenuHomePhabricator

When inserting an image, set its caption by default to be the Commons image description
Open, LowestPublicFeature

Description

When you insert image from commons it is with blank description. It is good to start with description from commons.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=49662

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:03 AM
bzimport set Reference to bz51032.

If the description there uses language templates, then it should only use the one corresponding to the language code of the wiki it is on. For example, [[File:Aglais urticae qtl1.jpg]] has descriptions in English, French, German and Lithuanian. When inserted in the English Wikipedia it should only copy the description from the {{en}} template, likewise on the German Wikipedia it should only take from the {{de}} template.

Change 137222 had a related patch set uploaded by Mooeypoo:
[wip] Use the image description as the caption

https://gerrit.wikimedia.org/r/137222

Change 137222 abandoned by Mooeypoo:
[wip] Use the image description as the caption

Reason:
Blocked on having structured image descriptions.

https://gerrit.wikimedia.org/r/137222

For the time being, you could use the extmetadata API:

https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:Aglais_urticae_qtl1.jpg&iiextmetadatafilter=ImageDescription&iiextmetadatalanguage=en

https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:Aglais_urticae_qtl1.jpg&iiextmetadatafilter=ImageDescription&iiextmetadatalanguage=de

Note that the current caching behavior is not too clever (API response for remote images is cached for 30 days, without any invalidation) and there is no sanitization (other than the one done by MediaWiki on saving) - the description can contain tables, images or any other weird HTML.

(In reply to Tisza Gergő from comment #4)

For the time being, you could use the extmetadata API:

https://en.wikipedia.org/w/api.
php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:
Aglais_urticae_qtl1.
jpg&iiextmetadatafilter=ImageDescription&iiextmetadatalanguage=en

https://en.wikipedia.org/w/api.
php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:
Aglais_urticae_qtl1.
jpg&iiextmetadatafilter=ImageDescription&iiextmetadatalanguage=de

Note that the current caching behavior is not too clever (API response for
remote images is cached for 30 days, without any invalidation) and there is
no sanitization (other than the one done by MediaWiki on saving) - the
description can contain tables, images or any other weird HTML.

I think we're better off waiting than coming up with a hack to drop "unwanted" tables but strip out the bits we do want, but thank you. :-)

Jdforrester-WMF moved this task from Freezer to Blocked on the VisualEditor board.
Jdforrester-WMF set Security to None.

Change 161342 had a related patch set uploaded (by Mooeypoo):
Transform the search widget to show image details

https://gerrit.wikimedia.org/r/161342

Patch-For-Review

Change 185220 had a related patch set uploaded (by Mooeypoo):
Add image description as an initial caption

https://gerrit.wikimedia.org/r/185220

Patch-For-Review

Jdforrester-WMF renamed this task from VisualEditor: When inserting an image, set its caption by default to be the Commons image description to When inserting an image, set its caption by default to be the Commons image description.Jan 23 2015, 10:05 PM

Inserting the author (if machine-readable) would also be helpful in some situations. Also, the author field is much more likely to be available than a description (especially a description in your language).

Inserting the author (if machine-readable) would also be helpful in some situations. Also, the author field is much more likely to be available than a description (especially a description in your language).

I don't think the author's name makes for a suitable caption?

In reply to @Esanders comment on the duplicated ticket (T115864):

The main issue I had with this is that often the description is not suitable as a caption. Either because the caption is too short or far too long, or because the description reads poorly because it assumes you don't have the context of the article.

My suggestion at the time was to have a button next to the caption field that says "use description".

I think we need to consider both scenarios:

  • When description and caption are redundant. For example, a martian landscape added to the Mars article. In this case, presenting upfront both concepts to the user requires to make a distinction between description and caption that is hard to make for the very specific image at hand. This can be confusing and can lead to spending time on creating two similar pieces of text instead of investing the time to create a better unified one. With a single field, the user adds the image, describes it, and when it gets added to the article the user views the image with a text that fits.
  • When description and caption need to be different. For example, a picture of the Rolling Stones in the Mick Jagger article (where the description is about the band while the caption is about the person). In this case, separating both concepts allows to provide each piece of information but the user still needs to understand what a caption is in a context which is disconnected from the article where the caption will be. With a single field, the user can provide a description for the image and once the image is displayed in context, the user can identify that the caption can be improved.

I think the context helps the user to do the right thing in each case, and making the user to learn the differences between caption and description adds friction for the expected gain.

In case it helps, here is a very random exploration I did long time ago when we were discussing whether to show descriptions, captions or both in Media Viewer:

I did a quick exploration by picking some random vital articles and going through 62 images:

  • 46% of the images lack description or it was not shown in Media Viewer
  • From the rest of the files where both caption and description:
    • 58% (26% of total) provide redundant information or the description didn't add additional details (example).
    • 44% (20% of total) show more details on the description or complementary info to the caption (example).

I also think that the need for this may be stronger when the user that uploaded the image is the same that is using it. So even if we are not considering adding the descriptions that others created for the file for now, I think we should at least consider it for the case of the uploading workflow inside VE (i.e., T115864).

Otherwise we are asking the same user to fill similar information twice without allowing her to even reuse easily parts of the content. The user just typed the description once and if they need to reuse some part we are asking to (a) type it again or (b) look for it in Commons (where the user may not be even aware that it has been already uploaded or how to get there).

Currently, when uploading to commons the user gets a wikitext snippet that includes the description as a default caption. Do we have any indication that this information is not useful to some of them or is affecting negatively the captions people create when adding them?

@Esanders, the author information is useful when you insert an image like https://commons.wikimedia.org/wiki/File:Pierre-Auguste_Renoir_089.jpg

Pau, I don't think that inserting the description causes problems as a general rule. The most likely reaction is to blank it and write what you want. It's possible that it could be slightly annoying if I use a translated description from Commons for a language that I don't understand (e.g., inserting an image on the Arabic Wikipedia with the Arabic description), but even then, that might be less annoying to the regular local editors than me inserting an image without any caption at all.

@Esanders, how close are we to having inline editing of the caption in VE? The number of steps involved in changing the caption might help us decide if we want to put something non-optimal there in the first place.

Change 185220 abandoned by Mooeypoo:
Add image description as an initial caption

Reason:
Can be revisited when and if product discussions warrant.

https://gerrit.wikimedia.org/r/185220

Deskana lowered the priority of this task from Medium to Lowest.Feb 23 2018, 4:35 PM

@Esanders, how close are we to having inline editing of the caption in VE? The number of steps involved in changing the caption might help us decide if we want to put something non-optimal there in the first place.

Was fixed in 2016: T149753: Allow editing of image captions in place

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:14 AM
Aklapper removed a subscriber: rmoen.