The purpose is to create image captions to all images uploaded in Drupal.

What I did:

  • installed media 2.0 / file entity 2.0 alpha2

  • added a new field called 'captions' in the image file types: admin/structure/file-types

Now I can add captions in the body field images.

I need the captions to be visible for other fields like image upload field.

How to exposed file_entity's fields in the content type form fields?enter image description here

1 Answer 1


Exposing file_entity fields in forms

A simple solution to this issue is to change each upload image field's widget type from default 'Image' to 'Media file selector'. Thus throught Media all file fields can be edited.

An alternative solution is File Entity Inline (https://drupal.org/project/file_entity_inline) which exposes the file entity fields as form fields.

Displaying file_entity fields in pages

If file_entity fields are not displayed in the page, test first if they are exposed using Views (field image). If you want to display them in a simple page with image fields already created try to workaround by adding new theme suggestions / template: e.g. file--image.tpl.php

The theme suggestions provided by the File Entity module are:

file__{file type}
file__{file type}__{view mode}
file__{mime type}
file__{mime type}__{view mode}
file__{file id}
file__{file id}__{view mode}
  • Now I can see and edit them but unable to show them on the page. Feb 5, 2014 at 15:06
  • I have re-edited my comment. Feb 6, 2014 at 8:55
  • To configure custom fields, add File Entity Inline idd, add an image field, and in the configuration of that very image field you'll find the proper fields you've created in a custom file type (created in File Types admin page). Nov 28, 2015 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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