Existing Image/Media not getting attached to a new created record via createMany

I have all images uploaded in media library and I am using createMany to create records in bulk. Have take 2 records for testing where I am passing images and their ids in array.But records are created without the images linked to them. Can anyone help?