setting type for the media field