The behavior of prop=imageinfo with redirects, particularly redirects
in foreign repos such as Commons, has always been a bit strange and
confusing. Depending on the source of the file, sometimes &redirects=1
is needed in the query to get the imageinfo for a redirect and
sometimes this is done regardless.

Recent changes to the file repository backend code will cause
prop=imageinfo to now always return the info for the target file, even
when querying a redirect without specifying "&redirects=1" in the
query. A new iiprop is also available, iiprop=canonicaltitle, to
indicate the title associated with the file info itself.

These changes will be deployed to WMF sites with 1.23wmf7, see
https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the
schedule.

A change is also being planned by Brian Wolff to change prop=imageinfo
back in the other direction: file redirects would never be followed
unless &redirects=1 is included. Feedback is welcome, particularly on
edge cases that will need to be handled.

--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce

Reply via email to