HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

FileUpload - Resize on Upload needed

phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
edited November 2013 in Feedback

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

  • jamesincjamesinc Sydney ✭✭

    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.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    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

  • peregrineperegrine MVP
    edited October 2014

    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.

  • peregrineperegrine MVP
    edited October 2014

    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.

  • peregrineperegrine MVP
    edited October 2014

    @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 :wink:

    .

    @vrijvlinder said in a completely unrelated message...: This is the Waiting for Reply Badge , because you answered their question and waited until they replied ...

    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.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    What is that black thing ? an Iphone 6 ? lmao

  • peregrineperegrine MVP
    edited October 2014

    @vrijvlinder said:
    What is that black thing ? an Iphone 6 ? lmao

    no, its an ericsson r290 satellite phone :wink:

    She's actually part of the personal secretary package.

    • she does the worrying and waiting for you,
    • (and you remain calm, patient and stress-free).
    • she's tryng to get phreak on the horn and leaving phone messages.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    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...

Sign In or Register to comment.