media_parent_entity_link
This module enables you to link image fields of media entities to their referencing (node) entities. You will be able to set up the view mode for the media entity accordingly.
Currently with Drupal Core media handling you are not able to link an image from within a media entity to the parent entity that is referencing the media entity. There is an option to link to "Content", but this will generate a link to the media entity and not to the entity that is embedding/referencing the media entity. Most often user will want to link the image to the parent entity and not to the media entity, especially when using such images in views. While you can achieve this with using field based views, it is not possible to achieve this with views based on view modes. This is where this module comes in to bridge this gap.
Some hints about this module:
- Currently this module supports display formatters "Image" and "Responsive image".
- If you check the "Link image to"-setting (from core module) and the "Link to parent entity..."-setting (from this module), the setting "Link to parent entity ..." will take precedence.
Attention: The module now (since version 1.4) supports extending formatters via hook. Blazy integration was tested succesfully. But still each formatter needs to be examined if it's compatible with this module first.
This module is similar to File Entity Link for Drupal 7, though it's not the successor to this module.