0

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

谢谢!

4

2 回答 2

2

为 Drupal安装Plupload 模块

编辑文件 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 客户端调整大小选项

于 2015-02-24T16:40:12.470 回答
0

Plupload具有该功能:

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

Drupal的Plupload 模块已经很方便地存在了。

于 2012-04-16T16:56:14.703 回答