added thumbnail and preview for photo