query: embed.html## try to determine the license of an image
  SELECT ?item ?image ?categoryName WHERE {
    BIND(wd:Q9188 AS ?item) # example
    ?item wdt:P18 ?image.
    BIND(REPLACE(wikibase:decodeUri(CONCAT("File:", STRAFTER(STR(?image), "/wiki/Special:FilePath/"))), " ", "_") AS ?imageTitle)
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:api "Categories";
                      wikibase:endpoint "commons.wikimedia.org";
                      mwapi:titles ?imageTitle.
      ?categoryTitle wikibase:apiOutput mwapi:category.
    }
    BIND(STRAFTER(?categoryTitle, "Category:") AS ?categoryName)
    FILTER(STRSTARTS(?categoryName, "CC-") || REGEX(?categoryName, "^PD[- ]"))
  }