• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

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