image_image_default_styles

function image_image_default_styles

image_image_default_styles()

Implements hook_image_default_styles().

File

modules/image/image.module, line 346
Exposes global functionality for creating image styles.

Code

function image_image_default_styles() {
  $styles = array();

  $styles['thumbnail'] = array(
    'label' => 'Thumbnail (100x100)',
    'effects' => array(
      array(
        'name' => 'image_scale',
        'data' => array('width' => 100, 'height' => 100, 'upscale' => 1),
        'weight' => 0,
      ),
    )
  );

  $styles['medium'] = array(
    'label' => 'Medium (220x220)',
    'effects' => array(
      array(
        'name' => 'image_scale',
        'data' => array('width' => 220, 'height' => 220, 'upscale' => 1),
        'weight' => 0,
      ),
    )
  );

  $styles['large'] = array(
    'label' => 'Large (480x480)',
    'effects' => array(
      array(
        'name' => 'image_scale',
        'data' => array('width' => 480, 'height' => 480, 'upscale' => 0),
        'weight' => 0,
      ),
    )
  );

  return $styles;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.module/function/image_image_default_styles/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部