In media.filter.inc I read this in media_get_file_without_label()_
// The formatter invoked by file_view_file() can use $file->override to
// customize the returned render array to match the requested settings. To
// support simple formatters that don't do this, set the element attributes to
// what was requested, but not if the formatter applied its own logic for
// element attributes.

I could modify the $file->override in hook_file_displays_alter(). But nothing to happend. After $element = file_view_file($file, $view_mode); there isn't work with $file->override.

Do I miss something, or is this bug/unimplemented feature? If the last, I would try to solve it.

Comments

devin carlson’s picture

Component: Documentation » WYSIWYG integration
Status: Active » Closed (duplicate)

The ability to alter an inserted file's meta data and fields is not currently implemented.

Please see #835516: Add ability to edit file meta data and fields when embedded in WYSIWYG.