Page MenuHomePhabricator

Image results on WCQS should be available
Closed, DuplicatePublic


As a WCQS user I want to be able to see query results in WCQS as an image result so that I can see the images immediately


  • After querying and getting back M-items, I want to switch to image view for results and be able to see actual resources there

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It looks like the image URL is already available in the RDF under schema:contentUrl, and it should be relatively simple to make the ImageGrid recognize those URLs as images. But that would require users to add something like ?file schema:contentUrl ?url to their queries. (In fact, with enough URI mangling in the query, you can show the images even today – see example query.)

Showing images based on M12345 entity IDs might be trickier. I don’t think we want the UI to make API calls to resolve the file names of those IDs, but is there anything that will redirect from a page ID directly to an image URL? Special:Redirect/page/ does the first part, Special:Redirect/file/ (aka Special:FilePath) does the second part, but we would need something that does both at once, so that the query service UI can link directly to Special:Redirect/something/12345 and get redirected to

Ainali renamed this task from Image results on WCQS should ba available to Image results on WCQS should be available.Jul 22 2020, 8:47 PM
Ainali updated the task description. (Show Details)
Ainali added a subscriber: Ainali.

Community already found a workaround for this, e.g.

select ?file ?image {
  ?file schema:contentUrl ?url ;
        schema:height 100 ;
        schema:width 100 .
  # workaround to show the images in an image grid
  bind(iri(concat("", replace(substr(str(?url),53),"_","%20"))) AS ?image)
} limit 2000

I think that it makes sense to pursue a way of doing exactly that, without workaround.