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

Idea for auto resize

jef68

Chevereto Member
I wanted the photos hosted on my forum are automatically resized and differently depending on the orientation (horizontal or vertical)
for this, I found this on the forum

includes/classes/class.upload.php
Code:
// Resize?
            $info = get_info($this->working);
            if($info['width']>800) {
                $this->resize_width = 800;               
               
            }


and I slightly modified like this
Code:
// Resize?
            $info = get_info($this->working);
            if($info['width']>800) {
                $this->resize_width = 800;
                if($info['height']>$info['width'])
                $this->resize_width = 600;
               
            }

it works very well
 
Back
Top