(setq slime-enable-evaluate-in-emacs t)
(insert-image (create-image "/tmp/test.png"))
(defun view-file-slime (file &key (bufname "*image-viewer*"))
(let ((ns (namestring file)))
(swank::eval-in-emacs
`(progn
(slime-with-popup-buffer (,bufname :connection t :package t)
(insert-image (create-image ,ns))
(image-mode)
(setf buffer-file-name ,ns)
(not-modified)
(image-toggle-display-image))
;; try to resize the image after the buffer is displayed
(with-current-buffer ,bufname (image-toggle-display-image))))))
It's shipped in the slime-media contrib.
Example
Show images in a separate pop-up buffer
https://readevalprint.tumblr.com/post/617089509006491648/previewing-images-in-and-out-of-slime-repl