I am trying to query CreatedBy.SmallPhotoUrl from the case feed item object but I keep getting an error "No such column 'SmallPhotoUrl' on entity 'Name'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."
This error is thrown only when I try to retrieve the photo url field from the subquery, it work's fine if the field is in the parent query.
SELECT Id, CreatedById, CreatedBy.Name, CreatedBy.SmallPhotoUrl, (SELECT Id, CreatedById, CreatedBy.Title, CreatedBy.Name, CreatedBy.SmallPhotoUrl FROM Feeds ORDER BY CreatedDate DESC NULLS LAST LIMIT 10) FROM Case ORDER BY CreatedDate DESC NULLS LAST LIMIT 25