Small improvement that avoids problem when fetching media that has been stored has doctrine2 entities/documents