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

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

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