Skip to content

Instantly share code, notes, and snippets.

@zachary0303
Last active March 29, 2018 11:36
Show Gist options
  • Save zachary0303/b62d704fdd9aebcbe8cd40a7d8a7f7e3 to your computer and use it in GitHub Desktop.
Save zachary0303/b62d704fdd9aebcbe8cd40a7d8a7f7e3 to your computer and use it in GitHub Desktop.
<?php
/**
* @file
* image_styles.features.inc
*/
/**
* Implements hook_image_default_styles().
*/
function image_styles_image_default_styles() {
$styles = array();
// Exported image style: featured.
$styles['featured'] = array(
'name' => 'featured',
'label' => 'featured',
'effects' => array(
1 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 380,
'height' => 245,
),
'weight' => 1,
),
),
);
// Exported image style: image_large.
$styles['image_large'] = array(
'name' => 'image_large',
'label' => 'image_large',
'effects' => array(
2 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 620,
'height' => 620,
),
'weight' => 1,
),
),
);
// Exported image style: image_medium.
$styles['image_medium'] = array(
'name' => 'image_medium',
'label' => 'image_medium',
'effects' => array(
3 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 300,
'height' => 300,
),
'weight' => 1,
),
),
);
// Exported image style: image_small.
$styles['image_small'] = array(
'name' => 'image_small',
'label' => 'image_small',
'effects' => array(
4 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 140,
'height' => 140,
),
'weight' => 1,
),
),
);
// Exported image style: image_thumb.
$styles['image_thumb'] = array(
'name' => 'image_thumb',
'label' => 'image_thumb',
'effects' => array(
5 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 60,
'height' => 60,
),
'weight' => 1,
),
),
);
// Exported image style: image_thumb_micro.
$styles['image_thumb_micro'] = array(
'name' => 'image_thumb_micro',
'label' => 'image_thumb_micro',
'effects' => array(
6 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 48,
'height' => 48,
),
'weight' => 1,
),
),
);
// Exported image style: profile_large.
$styles['profile_large'] = array(
'name' => 'profile_large',
'label' => 'profile_large',
'effects' => array(
7 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 140,
'height' => 140,
),
'weight' => 1,
),
),
);
return $styles;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment