Properly handle direct uploaded images that contain spaces