handle image extensions in doctrine loader