fixed bug with thumbnail image when post type is attachment for relationshiop field