User:User587668/common.js

var url = '/w/api.php?action=query&format=json&prop=imageinfo&titles=File%3AExample.jpg&iiprop=timestamp%7Cuser%7Curl%7Csize';

$.getJSON(url, function(res) { imgInfo = res.query.pages[0].imageinfo;  alert( imgInfo.url ); });