How to use node reference to link images of referenced node? I created a blog content type. In this content type I added a field "blog detail". I have a custom module to fetch data using node_load() in blog page. Now I want, when I click on a particular image, that this image's basic page would open using node_reference(). 

How can I do it?
I'ld suggest you use References. Add a node reference field into your blog content type. Finally when creating a blog node you'll reference a basic page (the one with your image).

Then check the display settings of your node reference field. Check the field formatters where you can choose


Title (linked)
Rendered Node
NID
etc...


Exactly there you have to add a field formatter now. Best by writing a small custom module. You may take the following code as a starting point:

/**
* Implements hook_field_formatter_info().
*/
function MY_MODULE_field_formatter_info() {
  $info = array(
    'linked_image' =&gt; array( // Machine name of the formatter
      'label' =&gt; t('Image (linked)'), 
      'field types' =&gt; array('node_reference'), // Scope (this one will only be available to node reference fields)
      'description' =&gt; t('Display linked image if available'),
    ), 
  );
  return $info;
}

/**
* Implements hook_field_formatter_view().
*/
function MY_MODULE_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
    foreach ($items as $delta =&gt; $item) {
      // get the nid,
      // do a node_load(),
      // get your image,
      // rework it
      // $linked_image = what ever you got
      $element[$delta]['#markup'] = $linked_image;
    }
  return $element;
}