Search code examples
urisparqlrdfsemantic-webdbpedia

Can't access DBpedia thumbnails


I am trying through my application to retrieve the value of thumbnail property and display the image. I don't know the structure of the URI in order to create the link for the image. So I went to the page of the resources (example: http://live.dbpedia.org/page/Henrik_Ibsen =>
http://commons.wikimedia.org/wiki/Special:FilePath/Henrik_Ibsen_by_Gustav_Borgen_NFB-19778_restored.jpg?width=300) and I clicked on the link of the value of thumbnail property but it takes me to an 404 page (error, page do not exist). All of them takes to the same error page. Is it a problem with DBpedia? do you know to which URI I should append the value of thumbnail to (in order to get the link for the actual image)?

Other examples of inaccessible DBpedia thumbnails

Thanks.


Solution

  • I found the solution by playing with the links. I replaced "commons" with "en" and I reduced the pixels. Then suddenly 80% of the images link that were broken become accessible.

    image= image.trim();
    image= image.replace("commons", "en");
    image= image.replaceAll("(jpg/)[^&]*(px)", "$1100$2");