function theme_file_styles_image_preview in Styles 7.2
Preview image for Styles UI.
File
- contrib/
file_styles/ includes/ themes/ file_styles.theme.inc, line 26 - file_styles/includes/themes/file_styles.theme.inc
Code
function theme_file_styles_image_preview($variables) {
// Media requires a file object.
// Also, image_style_url() crashes if you send it a file from a module.
// Thus, we need to copy it to the public:// directory first, for styles
// that need to use an image style.
// @see http://drupal.org/node/987846#comment-3949112
$sample_image = file_styles_preview_image();
$variables['object'] = file_styles_uri_to_object($sample_image);
$variables['field_type'] = 'file';
return theme('styles', $variables);
}