Fix tiny bugs in image viewer

Spaces and HTML characters(`"`, `#`) were causing images to improperly
load.

Don't display error message if there are no images.