Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to resize an image directly after the upload?


Go to End
Reply


3 Posts   701 Views

Avatar
knsqnt

Community Member, 98 Posts

14 March 2013 at 3:52am

Hi,

I try to limit the size of uploaded image to a maximum of 1600 px, but I don't get it... :-(

That's what I have so far:

class WebImage extends Image {
    protected function onBeforeWrite() {
        parent::onBeforeWrite();
        $this->SetRatioSize(1600, 1600);
    }
}

Thanks for any help.

Best, Mario

Avatar
2dealsok

Community Member, 1 Post

29 April 2013 at 6:18pm

Mark

Avatar
knsqnt

Community Member, 98 Posts

29 April 2013 at 7:18pm

Mark?