changes for HTML-based image viewer