--- label: 'Adding a new media type' related: - core.media - field_ui.add_field - field_ui.reference_field --- {% set content_structure_topic = render_var(help_topic_link('core.content_structure')) %} {% set media_topic = render_var(help_topic_link('core.media')) %} {% set media = render_var(url('entity.media_type.collection')) %}

{% trans %}Goal{% endtrans %}

{% trans %}Add a new media type that can be referenced in Media reference fields; media types are a content entity type. See {{ media_topic }} for an overview of media items and media types, and {{ content_structure_topic }} for more information on content entities and fields.{% endtrans %}

{% trans %}Steps{% endtrans %}

  1. {% trans %}In the Manage administrative menu, navigate to Structure > Media types.{% endtrans %}
  2. {% trans %}If there is not already a media type for the type of media you want to use on your site, click Add media type.{% endtrans %}
  3. {% trans %}Enter a Name and Description for your media type, and select the Media source.{% endtrans %}
  4. {% trans %}For most media sources, there is additional information that will need to be stored with your media item, in a field on your media type. Under Media source configuration, select an existing field to re-use to store this information, or select - Create - to create a new field.{% endtrans %}
  5. {% trans %}Note the types of metadata in the Field mapping section that can be mapped to fields on your media type.{% endtrans %}
  6. {% trans %}Click Save.{% endtrans %}
  7. {% trans %}Optionally, add additional fields for the metadata noted above or for other information that you want to store to your media type by clicking on Manage fields (see related topic below).{% endtrans %}
  8. {% trans %}If you have added metadata fields, click Edit. Under Field mapping, select the fields you added for each piece of metadata information.{% endtrans %}
  9. {% trans %}Click Save.{% endtrans %}
  10. {% trans %}You can now use this media type by adding a Media reference field to any content entity sub-type. See related topic below.{% endtrans %}