Set record ids of media_type rows with IMAGETYPE_XXXX constants from PHP GD library