summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorheliorcolorado2013-09-09 04:16:28 (GMT)
committerg089h515r8062013-09-09 04:16:28 (GMT)
commitddfa3e074e4b2df922027d0312605be04ffb60e9 (patch)
tree93342a27a3d283deb08a7adcedde670aa33d8d6d
parentbeb514a91f70249c9120db1ed953e51cc42cde2a (diff)
Issue #[2019369] supoort media file type.HEAD7.x-1.37.x-1.x
-rw-r--r--image_url_formatter.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/image_url_formatter.module b/image_url_formatter.module
index 1001a4e..6c53fea 100644
--- a/image_url_formatter.module
+++ b/image_url_formatter.module
@@ -36,7 +36,7 @@ function image_url_formatter_field_formatter_info() {
$formatters = array(
'image_url' => array(
'label' => t('Image URL'),
- 'field types' => array('image', 'imagefield_crop'),
+ 'field types' => array('file', 'image', 'imagefield_crop'),
'settings' => array(
'url_type' => '',
'image_style' => '',
@@ -210,7 +210,7 @@ function theme_image_url_formatter($variables) {
return $item['uri'];
}
$output = file_create_url($item['uri']);
- if ($variables['image_style']) {
+ if ($variables['image_style'] && ($variables['item']['type'] == 'image' || $variables['item']['type'] == 'imagefield_crop')) {
$image['style_name'] = $variables['image_style'];
$output = image_style_url($image['style_name'], $item['uri']);
}