Pressing "Q" when viewing an image will kill the buffer and window.