The way to add metadata for node fields that use the Drupal media module for images, is to use the Drupal token system just as we do for any other regular field. The token system is really powerful and can create metadata and schema data to the exact specification of all your content types. Adding the following token into the metatag image field/s will display a media entity reference image field.
[node:field_image:entity:field_image_2:entity:url]
So let me break this down. You can see that there are essentially two parts to this token. The first part ([node:field_image:) is the field name from your content type.
The second part: (entity:field_image_2:entity:url]) is the image field name from your media type.
So to add other metadata from the media images, you would use the following:
[node:field_image:entity:field_image_2:alt]
- for the alternative text (alt tag)
[node:field_image:entity:field_image_2:width]
- for the width of the image
[node:field_image:entity:field_image_2:height]
- for the height of the image