optimized getting view id in ProductImage