• 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

Force pictures to be loaded with a max width ?

sunsetbld

Chevereto Member
Hi Rodolpho :)

Im' testing the version 3.8.8.

Would it be possible for any picture to be loaded with a 640px max-width ? (Just those that are above 640px !)

I think its' in :
app/lib/classes/class.upload.php

Many thanks in advance for your help

Best
 
With load you meant upload right? In that case the change must injected in the core and you will need to keep patching in in every new update. Are you sure that you are OK with that?
 
app/lib/classes/class.image.php

Find this:
PHP:
            // Handle resizing KEEP 'source', change 'uploaded'
            $must_resize = FALSE;

Add before:
PHP:
            if($image_upload['uploaded']['fileinfo']['width'] > 640) {
                $params = ['width' => 640, 'height' => 640 * $image_upload['uploaded']['fileinfo']['height'] / $image_upload['uploaded']['fileinfo']['width']];
            }
 
Back
Top