Yes, you can display images, though it's not easy.
An old blog post explains the general idea, using a combinator template grader, which gives you complete control of the output. It assumes you can embed the image in the returned HTML as a data URI.
If you're writing your questions using Java, I recommend using a Java question scripted in Python, as discussed in this forum thread. That gives you much more flexibility in how you run Java.
We include matplotlib images in the result table, showing both the expected and got images. But we don't attempt to grade the image itself - it's only there for reference. Rather we grade the attributes of the image, giving output like:
But developing question types for such questions is a lot of work.
A potential gotcha: our IT department recently installed security policies that barfed at finding dataURIs embedded in the response to the browser. So recent versions of CodeRunner have been extended to allow the inclusion of files in the JSON response. It's briefly documented here (attribute 9). It adds additional complexity but avoids security policy issues and also can give a huge saving in space on the Moodle server if you have large classes. We have a course of nearly 1000 students answering many questions of the above sort, with lots of images in the result table on each attempt. With embedded data URIs, the same 'expected' images are recorded in the responses table many thousands of times. But using the new files attribute, only a single copy of each unique image is stored (since Moodle stores files by their hash).
However, I recommend building up to step by step from the version in the blog and using the new files functionality only if necessary.
You might also be interested in this paper: Automatic assessment of OpenGL computer graphics assignments, which describes the use of CodeRunner in a computer graphics course.
Post back if you need further help.