Added support for local photos as well as server hosted