How to enable insert module in installation profile? I want to use the insert module for a file field but I can't get it to be enabled programmaticly. Is there a setting like 'insert' => true, or something like that? Is there any documentation about the these settings because I can't seem to find any info on the web?
You can enable insert by updating the field instance settings with these two core functions:


field_info_instance
field_update_instance


for example:

/**
 * Enable insert field settings
 */
function MODULE_field_settings_enable_insert($entity_type, $field_name, $bundle){
  // Load field instance
  $instance = field_info_instance($entity_type, $field_name, $bundle);
  // Build insert settings array, these image styles are just examples
  $insert_settings = array( 
    'insert' =&gt; 1,
    'insert_absolute' =&gt; 1,
    'insert_styles' =&gt; 
    array (
      'image_236w' =&gt; 'image_236w',
      'image_237x147' =&gt; 'image_237x147',
      'image_486w' =&gt; 'image_486w',
      'colorbox__236w' =&gt; 'colorbox__236w',
      'colorbox__237x147' =&gt; 'colorbox__237x147',
      'colorbox__486w' =&gt; 'colorbox__486w',
      'auto' =&gt; 0,
      'link' =&gt; 0,
      'icon_link' =&gt; 0,
      'image' =&gt; 0,
      'image_60x60' =&gt; 0,
      'image_62x62' =&gt; 0,
      'image_62x82' =&gt; 0,
      'image_67x67' =&gt; 0,
      'image_69x52' =&gt; 0,
      'image_71x44' =&gt; 0,
      'image_71x71' =&gt; 0,
    ),
    'insert_default' =&gt; 'image_237x147',
    'insert_class' =&gt; 'caption',
  );
  // Add the insert settings to the field instance widget settings
  foreach($insert_settings as $key =&gt; $setting){
    $instance['widget']['settings'][$key] = $setting;
  }
  // Save the field instance
  field_update_instance($instance);
}

// Then you can enable insert on a field instance with
MODULE_field_settings_enable_insert('node', 'field_images', 'article')