You are here

function _ddblock_get_file_sizes in Dynamic display block 7

1 call to _ddblock_get_file_sizes()
_ddblock_get_image_array in ./ddblock.module
Get images from a directory.

File

./ddblock.module, line 2435
Enables your site to display dynamic content in a block.

Code

function _ddblock_get_file_sizes($path, $style_name) {

  // theme_image() can only honor the $getsize parameter with local file paths.
  // The derivative image is not created until it has been requested so the file
  // may not yet exist, in this case we just fallback to the URL.
  $style_path = image_style_path($style_name, $path);
  if (!file_exists($style_path)) {
    $style_path = image_style_url($style_name, $path);
  }
  $image_info = image_get_info($style_path);
  return $image_info;
}