Automatically select image type on upload