added image preview for image upload

I'm creating a new pull request since the other one was diffing all changes from the old version of dev. This one only diffs my newest changes. Please disregard the other pull request (it should be closed), and merge this one instead.