Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Need max image size, height, width parameters #1

Open
Evzy opened this issue Apr 13, 2015 · 13 comments
Open

Need max image size, height, width parameters #1

Evzy opened this issue Apr 13, 2015 · 13 comments

Comments

@Evzy
Copy link

Evzy commented Apr 13, 2015

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.

@jaredatch
Copy link
Contributor

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.

@Evzy
Copy link
Author

Evzy commented Apr 14, 2015

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 :)

@Dev-1
Copy link

Dev-1 commented Apr 14, 2015

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

@jaredatch
Copy link
Contributor

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

@Evzy
Copy link
Author

Evzy commented Apr 17, 2015

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.

@jaredatch
Copy link
Contributor

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
Copy link
Contributor

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

@Evzy
Copy link
Author

Evzy commented Apr 17, 2015

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
Copy link
Author

Evzy commented Apr 17, 2015

Rather than have 6 different sizes that should be there

@jaredatch
Copy link
Contributor

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)

@Evzy
Copy link
Author

Evzy commented Apr 17, 2015

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

@jaredatch
Copy link
Contributor

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.

@Rakhmanov
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants