• 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.
  • Chevereto Support CLST

    Support response

    Support checklist

Resizing/Converting

mikez

Chevereto Member
1 ) I want to figure how to resize images on upload.

My site is a marketplace forum and sellers will upload images to post in their sale threads. There's no need to have gigantic images so I want to restrict size incase some users upload huge images.

Is there a way to limit size, something like 1600 x 1200? Anything larger gets resized down.

2) I want to convert all images to jpg. how can I do that?

Thanks in advanced.
 
because png are huge files and offer no better quality than a jpg. I don't want to store png's, but I don't want to restrict them either. If they could be converted to jpg it would save 60-65% of disk space.
 
For any reason you want to conver X to JPG you can achieve it by adding conditional in class.upload.php file. Chevereto includes an image convertor.

Go to app/lib/classes/class.upload.php and replace this:

PHP:
        // BMP?
        if($this->source_image_fileinfo['extension'] == 'bmp') {
            $this->ImageConvert = new ImageConvert($this->downstream, "png", $this->downstream);
            $this->downstream = $this->ImageConvert->out;
            $this->source_image_fileinfo = G\get_image_fileinfo($this->downstream);
        }

To this:
PHP:
        if($this->source_image_fileinfo['extension'] !== 'jpg') {
            $this->ImageConvert = new ImageConvert($this->downstream, "jpg", $this->downstream);
            $this->downstream = $this->ImageConvert->out;
            $this->source_image_fileinfo = G\get_image_fileinfo($this->downstream);
        }
 
Resizing is more complicated, you need to get rid of the image resize on upload and then force client resize at app/lib/chevereto.js.
 
Back
Top