We are converting all of our images to the image type provided by media. What I don't really understand is that there seem to be multiple ways to do this. Am I supposed to give the 'image' media type a file field, and then use that? Or, should I give the 'image' media type a 'file' media type field, and use that? Or, is there something I'm missing and the 'image' media type already has support for images?

Based on my understanding, you're supposed to create a file field in the 'image' media type, and then you use that as the source. Is that right?


You need to add a field to the media entity, that acts as the base for a media provider module (such as images, files, remote videos, google docs, etc.). The various media provider modules dictate the field, that is needed to store and retrieve the essential information (and optionally some meta data)

E.g. for creating image media entity, you select "image" as media source (provider). Then add the image field to the entity, and select this field as base for media provider. Optionally the media provider can extract additional meta data (width, height, EXIF,...) from that field and map it to other fields of your media entity.

For a Youtube video (Video embed field), the base field is an URL field. For a File media entity, the base field is a file field. And so on.

  • Okay, thank you, but the base field which I use... should it be a reference to a file, or should it be a reference to a Media of type File? I imagine it's supposed to be a file, but I just want to make sure. – RaisinBranCrunch Jan 12 '18 at 17:24
  • The media entity should contain a "normal" field, not refernces to other media entities. – Hudri Jan 12 '18 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.