query: #defaultView:ImageGrid
  SELECT ?item ?itemLabel ?image
  WHERE 
  {
    ?item p:P31/ps:P31/wdt:P279* wd:Q178885. # Deities
    OPTIONAL{?item wdt:P18 ?image}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }