MyBB Community Forums

Full Version: Large avatars not resizing or adhering to KB limit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just found a user with a 4000x3000 pixel avatar. I had the settings set to 60kb max filesize and 150px max file dimensions.

MyBB Version: 1.63
PHP Version 5.2.14
GD Support enabled
GD Version bundled (2.0.34 compatible)

I'll add that I suspect this problem has been present for awhile and not a result of an upgrade.
That's your issue 6000pxx150x is huge, so either your avatar system is bugged or you mistakenly placed the wrong dimensions.
These are the exact settings:

Maximum Avatar Dimensions
The maximum dimensions that an avatar can be, in the format of widthxheight. If this is left blank then there will be no dimension restriction.
150x120

Max Uploaded Avatar Size
Maximum file size (in kilobytes) of uploaded avatars.
60

Avatar Resizing Mode
Automatically Resize Large Avatars
Then someone must of changed the settings before. If a member has a avatar that big got into ACP and remove it.
No- I think the settings don't work / never worked - the question is why. I'm hoping to find out if this has happened before.
(2011-06-06, 01:57 AM)Monaco Wrote: [ -> ]I just found a user with a 4000x3000 pixel avatar. I had the settings set to 60k max and 150px max.

MyBB Version: 1.63
PHP Version 5.2.14
GD Support enabled
GD Version bundled (2.0.34 compatible)

I'll add that I suspect this problem has been present for awhile and not a result of an upgrade.

Do you mean 60px? Because 60k stands for 60,000.
(2011-06-06, 04:08 AM)Spazmatic Wrote: [ -> ]
(2011-06-06, 01:57 AM)Monaco Wrote: [ -> ]I just found a user with a 4000x3000 pixel avatar. I had the settings set to 60k max and 150px max.

MyBB Version: 1.63
PHP Version 5.2.14
GD Support enabled
GD Version bundled (2.0.34 compatible)

I'll add that I suspect this problem has been present for awhile and not a result of an upgrade.

Do you mean 60px? Because 60k stands for 60,000.

No, the setting is in kb for Filesize:
Quote:Max Uploaded Avatar Size
Maximum file size (in kilobytes) of uploaded avatars.
60
When the "Avatar Resizing Mode" is either "Automatic Resizing" or "Give user the option to resize", MyBB will not give you an error on the max dimensions or max filesize limits if the generated thumbnail doesn't exceed those limits. This is for uploaded avatars. For remote avatars, it will give you an error about the max dimensions.
Is that user using a remote avatar or an uploaded one? Or is that file in the uploads/avatar/ folder?
If it is a remote avatar, he could have changed the file after he updated his avatar. MyBB only checks the dimensions when the avatar is updated via the UserCP. If the user replaces the file where url is pointing at, there is not much you can do than changing the "Maximum Avatar Dimensions in Posts" in the Show Thread Options. The latter will limit the size of the avatar when it's being displayed in the posts. You can do the same for the memberlist in "Member List"-settings and "Maximum Display Avatar Dimensions"