How to set a default image on a Drupal 7 Media field I have a non-required field_thumbnail that is of type "Multimedia asset", and the widget type is "Media file selector".  However on the field's settings page there is no option to specify a default value.  I've also perused the Administrative section seeking configuration in the Image styles, and File styles, but neither permit a default image to be used.

What would be the recommended way to get a default image, when a user does not select any media object for the given node?
Whenever I need to do this I just use a plain old Image field and use the Media File Selector as the widget. That way you can specify a default image for the field and still use the nice popup media browser.

So far I haven't found any benefits to using a Multimedia Asset field type over an Image field type in this situation, but that's not to say there aren't any or won't be any in the future.

EDIT

At the code level the following might help you get started:

// Implement hook_field_info_alter to add a setting for the multimedia field type
function MYMODULE_field_info_alter(&amp;$info) {
  $info['media']['settings'] = array(
    'default_asset' =&gt; NULL
  );
}

// Implement hook_field_settings_form on behalf of the media module
function media_field_settings_form($field, $instance, $has_data) {
  $settings = $field['settings'];
  $form['default_asset'] = array(
    '#type' =&gt; 'media',
    '#title' =&gt; 'Default Multimedia Asset',
    '#description' =&gt; 'The default asset to use when none is selected',
    '#default_value' =&gt; $settings['default_asset']
  );

  return $form;
}


That will add a default multimedia asset picker to the field settings. Then you just need to work out how to inject that default value into the field display when it's otherwise empty. I would guess at the use of something like hook_field_prepare_view() for this.

Note that there's no way to restrict the type of the default multimedia asset as those types are set at a per instance level, not at the field level. If you want to do it at the instance level much of the same code above will help but you'll have to extend it further to restrict the type of media based on the checkboxes on the instance form.