I want to display images at the proper image style-defined size, but there's a problem being caused by a preprocess function written by the person who built this site before I came onto the project.
function abc_field__field_video_thumbnail($variables) {
$output = '';
// Render the items
foreach ($variables['items'] as $item) {
$output .= "<div class=\"field-item\">\r";
$output .= '<a href="' . $movieurl . '" target="popup" data-popup-width="' . $variables['element']['#object']->field_video_width['und'][0]['value'] . '" data-popup-height="' . $variables['element']['#object']->field_video_height['und'][0]['value'] . '">';
$output .= '<img src="' . file_create_url($item['#item']['uri']) . '" alt="" width="' . $item['#item']['width'] . '" height="' . $item['#item']['height'] . '" class="' . $item['#image_style'] . '">' . "\r";
$output .= '<img src="/' . drupal_get_path('theme', 'nwe').'/images/button_play.png' . '" alt="Play Video" width="110" height="110" class="play-icon">' . "\r";
$output .= "</a>\r\r";
$output .= "</div>\r\r";
}
// Render the top-level div
$output = '<div class="' . $variables['classes'] . '"' . $variables['attributes'] . '>' . $output . '</div>';
return $output;
}
This seems to assume the image style processing would occur before this function happened, but unfortunately it doesn't, and I get a full-size image regardless of image style.