Add next/prev link to image in drupal 7 I have a taxonomy with lots of nodes in it. Each node contains a large image. I want that image to be linked to the next node within the taxnomy. How can I do this in Drupal 7?
Please see the solution that should work !


Hook into node view using hook_node_view by writing a custom module.
Change the image field to a image with link using below technique


Get nid of current node using $node->nid;
Get taxonomy term id associated with node object using this technique.
Get all other nodes attached with same taxonomy term that you got in step 2 using taxonomy_select_nodes
From the list of node id's that you got in step 3 check the node id which is just greater than $node->nid and store it in variable $next_nid
Form a link using l function that should be markup for image field.


$overrided_image_field_value = l($image, 'node/' . $next_nid, array('html' => TRUE));


That should do the work !