added handler for images and js