better conditional handling of entity images for frontend