Set $wgUsePathInfo = true; and $wgArticlePath = "$wgScript?title=$1";
Visit a page in the wiki that has an image
Click an image on that page
Expected: Image shows in media viewer
Actual: Media viewer loads but no image ever displays
Original report / additional information:
When the wiki uses ugly URLs, e.g. index.php?title=File:... or (verify this) index.php/File:... the viewer fails to scrape the filename properly, failing to show it. Sample API request:
api.php?action=query&format=json&prop=imageinfo&titles=index.php%3Ftitle%3DFile%3ACiambella_ricotta_claudia_fine.jpg&iiprop=url|extmetadata&iiurlwidth=1920&iiurlheight=640
{"query":{"normalized":[{"from":"index.php?title=File:Ciambella_ricotta_claudia_fine.jpg","to":"Index.php?title=File:Ciambella ricotta claudia fine.jpg"}],"pages":{"-1":{"ns":0,"title":"Index.php?title=File:Ciambella ricotta claudia fine.jpg","missing":""}}}}