The documentation states you can change the Content-Type like that in your module's view.yml:
imageSuccess:
http_metas:
content-type: image/jpg
has_layout: false
This doesn't seem to work (any more) though. See attached functional tests. Two of the new tests fail:
# get /view/plain
ok 65 - status code is 200
not ok 66 - response header Content-Type is text/plain; charset=utf-8 (text/html; charset=utf-8)
# Failed test (./test/functional/genericTest.php at line 173)
...
# get /view/image
ok 69 - status code is 200
not ok 70 - response header Content-Type is image/jpg (text/html; charset=utf-8)
# Failed test (./test/functional/genericTest.php at line 182)