generate thumbnail only if photo present