modified web.js for displaying images