You are here

function manualcrop_preprocess_image_url_formatter in Manual Crop 7

Preprocessing for theme_image_url_formatter(); Force reloading of an image after re-cropping.

File

./manualcrop.module, line 579

Code

function manualcrop_preprocess_image_url_formatter(&$variables) {
  if (!empty($variables['image_style'])) {
    $url = image_style_url($variables['image_style'], $variables['item']['uri']);
    $url = _manualcrop_add_cache_control($variables['image_style'], $url);
    if ($url) {
      $variables['item']['uri'] = $url;
      $variables['image_style'] = '';
    }
  }
}