added test for whether uploaded file is an image. images are now displayed in browser after upload