Hi,
I’m developping a language learning program in which I illustrate words with a picture. The words are labels of Wikidata items I get width a sparql query. In this query, I also retrieve the picture linked to the item.
SELECT ?label ?image WHERE {
?ident wdt:P31|wdt:P279 wd:Q1075.
?ident rdfs:label ?label.
?ident wdt:P18 ?image.
FILTER (lang(?label)="fr")
}
LIMIT 12
The retrieved picture is a redirection to Commons, e.g. http://commons.wikimedia.org/wiki/Special:FilePath/Owoce%20wisni.jpg
I would like, from this url, acces to the url of a thumbnail of the picture (to minimize my pages loading time). For instance, I would like to obtain the file url : https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Owoce_wisni.jpg/320px-Owoce_wisni.jpg
Is that an automatic way to do this ?
Thanks a lot