在Drupal 7中调整客户端图像的大小?

时间:2012-04-16 14:21:07

标签: drupal-7 drupal-modules image-resizing

是否有任何模块与图像/文件字段模块集成,允许我在Drupal 7中调整客户端图像的大小?我的客户有非常大的图像,我更喜欢他在客户端调整它们的大小....

谢谢!

2 个答案:

答案 0 :(得分:2)

安装Plupload module for Drupal

编辑文件plupload.module

'resize' => array('width' => '320', 'height' => '240', 'quality' => '90'),添加到#plupload_settings。

示例:

$element['filefield_plupload']['pud'] = array(
      '#type' => 'plupload',
      '#title' => t('Select one or more files to upload'),
      // Even though filefield does validation on submit, this is required for
      // client side validation as well as proper file munging during upload.
      '#upload_validators' => $element['#upload_validators'],
      '#plupload_settings' => array(
          'cardinality' => $field['cardinality'],
          'resize' => array('width' => '320', 'height' => '240', 'quality' => '90'),

参考:Drupal问题:plupload client side resize option

答案 1 :(得分:0)

Plupload具有该功能:

  

允许您使用HTML5 Gears,Silverlight,Flash,BrowserPlus或普通表单上传文件,提供一些独特的功能,如上传进度,图像大小调整和分块上传。

足够Plupload module for Drupal已经存在。