Commit ddfa3e07 authored by helior's avatar helior Committed by g089h515r806

Issue #[2019369] supoort media file type.

parent beb514a9
......@@ -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']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment