User Level: 
Click on an image to make it bigger.
Drupal 8 - Media - Image Media Type - Image Field Mapping

1. Field Mapping Fields Not Correct

Field Mapping provides a map to import metadata about the media type.

Looking in both the Height and Width fields, we find that they don't have corresponding select entries.

This means we need to add them into the media entity type.

Drupal 8 - Media - Image Media Type - Add Width Field

2. Add a Field

To add a new field:

Click on the Manage Fields tab.

Click the Add Field button.

Drupal 8 - Media - Image Media Type - Add Data Type and Label

3. Add Data Type and Label

Add a New Field select box = Number (integer)

Label field = Width

Machine-Readable Name field = override to media_image_width

Click the Save and Continue button.

Drupal 8 - Media - Image Media Type - Add Number of Values

4. Set Allowed Number of Values

A new screen will appear.

Allowed Number of Values drop down fields = Leave as is

Click the Save Field Settings button.

Drupal 8 - Media - Image Media Type - Add Height Field

5. Width Field Completed

You'll be redirected back to the field list with a new Width field displaying in the list.

Now click the Add Field button and add a Height field using the same method that was just used for Width.

Drupal 8 - Media - Image Media Type - Height Field Added

6. Height Field Completed

After the Height field is added, you'll be redirected back to the Manage Fields list.

Your new Height field will show in the list.

Drupal 8 - Media - Image Media Type - Set Field Mapping

7. Set Field Mapping

Now it's time to map those new fields.

Click on the Edit tab.

  • Width field = Width
  • Height field = Height

Click the Save button.

Drupal 8 - Media - Image Media Type - Add Source Data - Confirmation

8. Update Confirmation

Upon saving, you'll be redirected back to the Media Types screen and will receive a confirmation at the top.