identify empy profile picture and show profile picture in all thumbnails

Check whether there is a profile picture of not
Replace all the static link to profile picture with the link to the
servlet that serves the images