plupload icon indicating copy to clipboard operation
plupload copied to clipboard

Client resize not working

Open o-rey opened this issue 7 years ago • 7 comments

Client resize stopped working after switching version 2 to version 3. My config options are resize: { width: 224, height: 150, crop: true }

If I replace plupload.full.min.js by plupload.dev.js I see in console: StateChanged: ImageResizer::o_1c8trj0291nch2s91lje1hm217b8g (IDLE to DONE) so resizer is being called, but uploaded image still the same size.

o-rey avatar Mar 19 '18 00:03 o-rey

Bump. I'm using PLUpload in Bootstrap 4 and the client side resize isn't doing anything. I'm not seeing anything in console. It's just failing silently.

fotan avatar Apr 10 '18 16:04 fotan

To clarify on my comment, resize does not work in v3 of plupload. It works fine in v2.

fotan avatar Apr 10 '18 17:04 fotan

Same here with Firefox 59/Ubuntu 16.04.1/plupload 3.1.2, 'html5' runtime : the resize function doesn't seem to work. I have breakpoints set throughout the code and moxie/runtime/html5/image/ResizerCanvas/scale is indeed called. But it seem some other steps further down the chain are ignored. Maybe non-related, but the unique_names feature is broken as well in my environment since the upgrade.

jfstenuit avatar Apr 13 '18 11:04 jfstenuit

Hello, do you have any solutions for this? version 3.1.2 resizing does not work !!!

maPer77 avatar Aug 19 '18 20:08 maPer77

I also have encountered the same issue.

warrenkc avatar Oct 25 '18 13:10 warrenkc

And here I am in 2022 trying to use v3... var rszr = new ImageResizer(file); seems to be creating a new instance of "ImageResizer" but not including any of the options specified when setting up new plupload.Uploader({})

dealer-solutions-gene avatar Feb 25 '22 06:02 dealer-solutions-gene

Additional commentary, I can see what ultimately resizes the image is done with HTML5 canvas here

canvas.getContext("2d").drawImage(_getImg(), rect.x, rect.y, rect.width, rect.height, 0, 0, canvas.width, canvas.height);

however the source and destination image dimensions are the same, leading to a canvas that is the exact same size as the previous image. Going back to 2.3.9 works

dealer-solutions-gene avatar Feb 25 '22 20:02 dealer-solutions-gene