• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

resize picture problem...

cetipabo

Chevereto Member
hello,
i would like all my pictures uploaded resized to 900 pix width, but if th picture width is lower then just uplaod the picture and not resized.
Actually the system is blocking the upload and says: over resize detected
how can i do to make the system accepting the picture to be uploaded, and not resizing it ?

Thank you very much, i just bought chevereto ;)
 
So if I get you right... You want that all the images above 900px width will be resized to 900px width excluding any file below 900px width?
 
yes, exactly.:)
i looked across the forum and i'm surprised that noone asked for this :(

i thought the over_resize parameter was to avoid Over Resizing a picture...

Edit:
sorry, i think this topic is not in the correct place, maybe move it in the "tech support" area ?
 
sorry, i think this topic is not in the correct place, maybe move it in the "tech support" area ?

Nope. Tech Support is when your site doesn't work. This is a custom implementation, different thing.
 
ha ok...
well, i found how to insert the 900px value by defaut in the page, so that way all pictures will be resized.
i just need to know where/how to disable the error message when a picture is lower than 900px and let the picture to be uploaded without being oversized.

Could you help me please ?
Thanks.
 
Revert any change you have made and then open includes/classes/class.upload.php and replace this:
PHP:
            // Resize?
            if(check_value($this->resize_width)) {
                $this->ImageResize = new ImageResize($this->working, $this->working, $this->resize_width);
                if(check_value($this->ImageResize->error)) {
                    $this->error = $this->ImageResize->error;
                    return false;
                }
            }

With this:
PHP:
            // Resize?
            $info = get_info($this->working);
            if($info['width']>900) {
                $this->resize_width = 900;
            }
            if(check_value($this->resize_width)) {
                $this->ImageResize = new ImageResize($this->working, $this->working, $this->resize_width);
                if(check_value($this->ImageResize->error)) {
                    $this->error = $this->ImageResize->error;
                    return false;
                }
            }
 
Back
Top