added support to view image and video online