store media type in env["wd.media_type"]