D7 - field_update_instance requiring manual refresh after node save to view new values I'm using preprocess_entity to alter an image's style display setting based on number of entity references within a paragraphs bundle. The display setting value is correctly altered on node save, but the updated image style won't display without an additional browser refresh.

function THEME_preprocess_entity(&amp;$variables) {
  if ($variables['entity_type'] == 'paragraphs_item') {
    if ($variables['elements']['#bundle'] == 'promotions') {
      $promo = $variables['field_promotions'];
      $promo_count = count($variables['field_promotions']);
      $promo_img_styles = array(
        1 =&gt; 'promotion_1x',
        2 =&gt; 'promotion_2x',
        3 =&gt; 'promotion_3x',
        5 =&gt; 'promotion_5x'
      );
      $promo_img_style = str_replace(array_keys($promo_img_styles), $promo_img_styles, $promo_count);
      $promo_fields = field_info_instance('node', 'field_promotion_image', 'promotion');
      $promo_fields['display']['full']['settings']['image_style'] = $promo_img_style;
      field_update_instance($promo_fields);
    }
  }
}


Any ideas why field_instance_update is requiring the additional refresh?
the theme function occurs towards the end of the page request lifecyle in the theme layer of a drupal request.

Whereas, the field_update_instance call is updating the database values for this Node's promotion image. The node is already loaded and being used as variables within in the theme at this time. When you refresh the page you're requesting the Node from the database again -- which is "refreshing" the data.