I would like to retrieve a random image resource from a server that comply IIIF standard.
Using the IIIF search API, is it possible to retrieve a random resource instead of specifying a search query?
No unfortunately not. The IIIF Content Search API has been developed to search specifically within resources that may have a textual description. The compatible response from a IIIF Content Search API server is an annotation list, thus it does not make sense here to provide back a random resource.
Some IIIF adopters do provide search interfaces that could be used to retrieve random resources, but there are no IIIF specifications around this at the moment.
Example random search result: https://exhibits.stanford.edu/fitch/catalog?utf8=%E2%9C%93&exhibit_id=fitch&search_field=search&q=&sort=random+asc