I did something similar, but using the standard library image capabilities of emacs instead of iimage mode. As a result, you don't need to have the mode enabled:
;; To know if I need to print as image or I need to default to the default eshell/cat
(defun my-is-imagep (filename)
(let ((extension (file-name-extension filename))
AFAIK piping in Eshell works on the stdin side only for external commands.
You can send stuff through eshell/echo into a pipe but you cannot read from stdin via (read) in a non-batch emacs session. If you try you get an unwanted interactive prompt.
(I would be happy if somebody could prove me wrong in that regard.)
That being said, what you actually want ...