FileUpload - Resize on Upload needed
Hi,
I use FileUpload and my users pretty much love it. A lot of them are mobile and upload their Smartphone 3MP-size pictures, without resizing before. They are uploading so much that my ~/uploads/FileUpload/ folder again and again rises its size up to 20GBs. I have a script to batch-resize all the pictures inside and run in from time to time. So far no problem.
But smarter would be if the FileUpload plugin would have the ability to resize during the upload... as it's known from other scripts. I could be fairly easy defined in the plugins settings with a max width or height and a compression ratio if they are JPGs.
Maybe this function is already built in and can be defined in the config.php, but if not it be great to hear your feedback.
Greetz
phreak
- VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
- VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Comments
Bump, I agree a resize-on-upload for image types would be a great feature. Users on my forum frequently upload phone camera pics, which are generally a few MB in size, which has caused my bandwidth bill to really start ramping up recently.
You might want to look at the Image Upload plugin, which does have max size settings, either to use it on your site, or see how it is done.
http://vanillaforums.org/addon/imageupload-plugin
never mind code I posted needs some fixing.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
here's a replacement for class.fileupload.plugin.php that will crop resize images.
use it with 2.1.3 - and this backport
http://vanillaforums.org/discussion/comment/216335/#Comment_216335
then overwrite this zip over the class.fileupload.plugin.php
you can adjust The full image cropping resizing by
$Configuration['Plugins']['FileUpload']['FullImageWidth'] = '1400';
other wise the default is 700px for save width if original image is wider than 700px.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@phreak - I said crop above I meant resize. I'll wait for the grapes to ripen.
it took an entire year of man-hours to make code changes
.
getting a bit antsy, are we?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
What is that black thing ? an Iphone 6 ? lmao
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
no, its an ericsson r290 satellite phone
She's actually part of the personal secretary package.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yes the first thing I thought it was an erection, I mean erricsson ...
That brings back painful memories of my early teen life , waiting for the boy to call...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌