summaryrefslogtreecommitdiff
path: root/modules/image
diff options
context:
space:
mode:
Diffstat (limited to 'modules/image')
-rw-r--r--modules/image/image.field.inc3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/image/image.field.inc b/modules/image/image.field.inc
index f7bb499de..1b4a96852 100644
--- a/modules/image/image.field.inc
+++ b/modules/image/image.field.inc
@@ -463,8 +463,7 @@ function image_field_formatter_view($obj_type, $object, $field, $instance, $lang
// Check if the formatter involves a link.
if (strpos($display['type'], 'image_link_content') === 0) {
- list($id) = entity_extract_ids($obj_type, $object);
- $path = $obj_type . '/' . $id;
+ $path = entity_path($obj_type, $object);
}
elseif (strpos($display['type'], 'image_link_file') === 0) {
$link_file = TRUE;