如何更改plupload缩略图的大小?

时间:2019-05-05 20:02:00

标签: jquery plupload

我正在使用 plupload插件,以便用户将图像拖放到input[file]中。默认缩略图大小为100x60。我如何将此尺寸更改为另一个尺寸?我的初始化代码是:

$("#uploader1").plupload({
    // General settings
    runtimes : 'html5,flash,silverlight,html4',
    url : '../upload.php',
    max_file_count: 1,
    chunk_size: '1mb',
    filters : {
      // Maximum file size
      max_file_size : '1000mb',
      // Specify what files to browse for
      mime_types: [
        {title : "Image files", extensions : "jpg,gif,png"},
        {title : "Zip files", extensions : "zip"}
      ]
    },

    sortable: false,
    dragdrop: true,
    views: {
      list: true,
      thumbs: true, // Show thumbs
      active: 'thumbs'
    },


    // Flash settings
    flash_swf_url : '../../js/Moxie.swf',

    // Silverlight settings
    silverlight_xap_url : '../../js/Moxie.xap'
  });

1 个答案:

答案 0 :(得分:1)

此小部件具有thumb_widththumb_height选项,用于自定义缩略图大小。检出Allow users to make thumbnails larger in the UI Widget

$("#uploader1").plupload({
    // Your settings
    thumb_width: 200,
    thumb_height: 120 
});