@auden has made something here which may already be what you want, at lest for images:
Possibly a newer version of it shown here: