basic-user-avatars icon indicating copy to clipboard operation
basic-user-avatars copied to clipboard

Need max image size, height, width parameters

Open Evzy opened this issue 10 years ago • 13 comments

Users are uploading a picture that is 2mb 7000x4000, The plugin won't resize the image, even so. if theres images over a certain size can they just be disallowed? takes up server space too.

Evzy avatar Apr 13 '15 06:04 Evzy

Ideally there should be a filterable threshold, say maybe 1mb, that if an image is larger than that it doesn't upload and provides an error message to the user telling them it is too large.

jaredatch avatar Apr 13 '15 21:04 jaredatch

Yeah, main reason is because when this image uploads, it doesnt rescale and breaks my webpage theme.

Thanks anyway though, this plugin is otherwise perfect :)

Evzy avatar Apr 14 '15 03:04 Evzy

Pluign is great but it needs settings: max dimensions and file size limitation for upload

Dev-1 avatar Apr 14 '15 07:04 Dev-1

@Evzy which page is it breaking, specifically, so I can look into that?

jaredatch avatar Apr 16 '15 13:04 jaredatch

Any that contain the persons avatar pic on bbpress. So if theyre the latest article. The index will break because it shows latest poster. If theyre not, it will be broken on the topic they post in. Also breaks the users setting page so they cannot edit their picture or anything else. I can send you a link to the picture so you can look at it yourself.

Evzy avatar Apr 17 '15 00:04 Evzy

Hmm, I'll look into this. So not only when editing/viewing the profile, but also on the topics? Interesting, can't say I've noticed that, but I can try to upload a 2000x2000 image and see what happens :)

jaredatch avatar Apr 17 '15 01:04 jaredatch

Hmm, I can't replicate it.

I uploaded a 1200x1200 image, but on bbPress (and else where) it shows everything correctly from what I can tell.

http://cl.ly/image/2i2E1h1y2e1W http://cl.ly/image/1o41211w332F http://cl.ly/image/2V142v2K0G00 http://cl.ly/image/46150u1e2t2O http://cl.ly/image/3Y1r442K1I2s

jaredatch avatar Apr 17 '15 01:04 jaredatch

That looks correct. My image wouldn't be scaled and resized, there was only the original in my upload folder, so it used the 4000x7000 one.

Evzy avatar Apr 17 '15 01:04 Evzy

Rather than have 6 different sizes that should be there

Evzy avatar Apr 17 '15 02:04 Evzy

Hmm, sounds like the image resizing isn't going through (https://github.com/jaredatch/Basic-User-Avatars/blob/master/init.php#L170)

The thing is even if the image isn't resizing correctly, it should still get the correct dimensions inline (see https://github.com/jaredatch/Basic-User-Avatars/blob/master/init.php#L186)

jaredatch avatar Apr 17 '15 02:04 jaredatch

There there a possible fix for that? As well as id prefer size width and height parameters too and it would be perrrfect

Evzy avatar Apr 17 '15 03:04 Evzy

Trying disabling all other plugins (other than bbPress) and switch to a default WordPress theme.

I think something is interfering with things. If you view the source of the page, the image should be getting image and height attributes on it at a minimum.

jaredatch avatar Apr 17 '15 14:04 jaredatch

Ok this thing is real, today happened. Also made mess displaying user. It has included image size of 5k pixels as avatar since it did not re size. Need this filter.

Rakhmanov avatar Aug 03 '15 00:08 Rakhmanov