Topic: Resize not working in UI Widget

Hi

I'm trying to resize the image but seems to not be working.

I'm using this configuration:

$(function() {
    $('#uploader').plupload({
        runtimes : 'html5,flash,html4',
        browse_button : 'pickfiles',
        container: 'contenedor',
        max_file_size : '20mb',
        url : 'receptor.asp',
        resize : {width : aWidth, height : aHeight, quality : aQuality},
        flash_swf_url : './js/Moxie.swf',
        file_data_name: 'imagen',
        chunk_size : '300kb',
        unique_names:false,
        filters : [
            {title : "Image files", extensions : "jpg,jpeg"}
        ],

        dragdrop: true,

        views: {
            list: true,
            thumbs: true,
            active: 'thumbs'
        },

        // Post init events, bound after the internal events
        init : {
            FilesAdded: function(up, files) {
                // Called when files are added to queue
                console.log("[FilesAdded]");
                for (fileid in files) {
                    aSize += files[fileid].size;
                    console.log("El archivo es de %s, el total de %s", plupload.formatSize(files[fileid].size), plupload.formatSize(aSize));
                }
            },

            UploadComplete: function(up, files) {
                // Called when file has finished uploading
                console.log("[UploadComplete]");
                // backButtonState = true;
            },

            Error: function(up, error) {
                // Called when error occurs
                alert(error.message);
            },

            FilesRemoved: function(up, files) {
                // Called when files are removed from queue
                console.log("[FilesRemoved]");
                for (fileid in files) {
                    aSize -= files[fileid].size
                }
            }
        }

    });
});

- I tried to hardcode the width and the height for avoid possible mistake.
- I tried to change quality.
- I tried with diferents size images.

The uploads went all ok but the size is the same of the original images.

Re: Resize not working in UI Widget

The only case when resize won't be applied, is if the requested resize dimensions are bigger than that of the image. You said you are using UI Widget, right? If you are seeing the thumbnails in thumb view, then that's the resize in action.

If you want to see your issue fixed, do not report it here, do it on - GitHub.

Re: Resize not working in UI Widget

Thanks for de answer @davit.
Yes, I see the thumbnails in the GUI, but the uploaded image has the same size of the original. The resize function is working like you say, but it's not working to resize the file that I'm uploading.

I'm trying with an image of 3591x5400 so it's small that 6500x6500.

Re: Resize not working in UI Widget

Hi! I have the same error, but only when I change the resize settings

uploader.settings.resize = {width : size[0], height : size[1], quality : 90};

Re: Resize not working in UI Widget

Hi, I had the same problem but I fixed it with adding the param enable = true.

The param enabled is required for work with the resize function!

It's added  automatically by plupload when you specify the size params in start configurations but when you change it like I did, that overwrite the settings and deleted the enabled param, you need to change it like this:

uploader.settings.resize     = {width : size[0], height : size[1], quality : 90, enabled: true};