How to modify the image output for just one content type? We are using a field_image field across multiple content types. For the basic content type (only) we want to lazy load the images as such it requires the following  format. How can this be done for just basic content type? 

Current output:

&lt;img src="some-url"&gt;


Desired output:

&lt;img data-src="some-url"&gt;
You can do this by defining a "lazy load" image style and using it as the image display.  This style does not have to do any resizing.  It would just be a placeholder flag for a preprocess function like:

function my_theme_preprocess_image(&amp;$variables) {
  if ( $variables['style_name'] == 'lazy_load') {
    $variables['attributes']['data-src'] = $variables['attributes']['src'];
    unset($variables['attributes']['src']);
  }
}


Nice thing is that you can use this style anywhere to get lazy loading images.