Hi,
I just noticed that if you use the "redirect" option with the "action=query&prop=imageinfo" API, it does provide a <redirects> element as expected, but there's no image info? You need to do a new query with the redirected image name to retrieve it.
I think this is different behavior from "redirect" in the other APIs, where it provides the info with the redirect at the same time.
Is this a bug or expected?
http://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&titles... <?xml version="1.0"?> <api> <query> <redirects> <r from="File:Liberia court of arms.png" to="File:Coat of arms of Liberia.png" /> </redirects> <pages> <page pageid="23044582" ns="6" title="File:Coat of arms of Liberia.png" imagerepository="" /> </pages> </query> </api>
http://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&titles... <?xml version="1.0"?> <api> <query> <pages> <page pageid="23044582" ns="6" title="File:Coat of arms of Liberia.png" imagerepository="local"> <imageinfo> <ii timestamp="2009-06-01T14:04:00Z" size="14121" width="200" height="211" thumburl="http://upload.wikimedia.org/wikipedia/en/thumb/1/12/Coat_of_arms_of_Liberia.png/121px-Coat_of_arms_of_Liberia.png" thumbwidth="121" thumbheight="128" url="http://upload.wikimedia.org/wikipedia/en/1/12/Coat_of_arms_of_Liberia.png" descriptionurl="http://en.wikipedia.org/wiki/File:Coat_of_arms_of_Liberia.png" metadata="" mime="image/png" /> </imageinfo> </page> </pages> </query> </api>
-Pierre
________________________________ Pierre-Olivier Latour pol@cooliris.com