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

Picture resize

MFrei

Chevereto Member
Hey,
some of my users complain that they can't resize pictures.

They can enter in the size-field what they want, but the picture size does not change.
Two of them use Win 7/Firefox or Win Vista/Chrome for example.
On my computer eg it works fine (Mac OS X/Safari and Win 7/IE).

Info: I have set a maximum size for pictures - it's 1024, so every larger image will be converted to 1024. They can enter like 500 now, but will get a 1024px image.

Has anyone an idea?
 
Remember over resize means they can't resize it to something bigger, unless you enable it in config.. may i know your URL to see?

If it works fine on yours, then it is a client side problem or the way to script responds.. in which Rodolfo will check.
 
We added an authentication to the script, so only our forum users can upload pictures...

Okay, now i have the same problem... if i upload a picture and enter "500", it still keeps the width of 1024...
 
I don't know what do you tweak in the system. Most likely, the resize field isn't being posted.
 
The problem is that in the default theme the resize field is only taken when it has the "valid" class attached. When you forced the 500px width there you also need to add class="valid" to fool the system. If I remove the default 500 and write 500 myself the resize is done. So, add class="valid" to the input id "resize".

I've try to upload a picture near 3500 width and it was resized to 1024. I've also resized to 123 width a picture of 224px.
 
Like this?

<input type="text" id="resize" name="resize" maxlength="4" value="500" class="valid" />

That doesn't work... :/
 
You want that the max size of any uploaded image must be 1024 and yet be able to resize below 1024px like 250px and so on?
 
Yes, there shouldn't be any picture over 1024 stored on the server, but our users need to be able to choose their own size like 300px but not larger than 1024.
 
That is different, that is the main reason you have issues... you are doing something that is for something else.

Change this:
PHP:
            if($info['width']>1024) {
                $this->resize_width = 1024;
            }

To this:
PHP:
            if($info['width']>1024) { // Bigger than 1024
                if(!check_value($this->resize_width)) {
                    $this->resize_width = 1024;
                } else if($this->resize_width > 1024) {
                    $this->resize_width = 1024;
                }
            }

By the way, moved to development.
 
Back
Top