# Avatars plugin issues

Hi there,
I found few problems with your Avatars plugin.
1. Big image problem -> I tried to upload jpg image with size 1.6Mb and dimensions 2612x2592 (Suggestions - limit size of uploading image, maybe dimensions limit is required too)
b. Image crop -> got an error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10448 bytes) in ...\wp-content\mu-plugins\avatars.php on line 857

c. Going back to Users/Your Avatar -> shows default avatar
d. Looking for image on server in ...\wp-content\avatars\user\c4c -> Uploaded image is there.
e. On Users/Your Avatar /Reset -> image not deleted, for few seconds appears this error [after ~2 seconds plugin redirects user to Users/Your Avatar] (Suggestions – hide Reset button when Default Avatar is displayed):

Warning: chmod() [function.chmod]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1211
Warning: unlink(.../wp-content/avatars/user/c4c/user-1-16.png) [function.unlink]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1212
Warning: chmod() [function.chmod]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1211
Warning: unlink(.../wp-content/avatars/user/c4c/user-1-32.png) [function.unlink]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1212
Warning: chmod() [function.chmod]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1211
Warning: unlink(.../wp-content/avatars/user/c4c/user-1-48.png) [function.unlink]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1212
Warning: chmod() [function.chmod]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1211
Warning: unlink(.../wp-content/avatars/user/c4c/user-1-96.png) [function.unlink]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1212
Warning: chmod() [function.chmod]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1211
Warning: unlink(.../wp-content/avatars/user/c4c/user-1-128.png) [function.unlink]: No such file or directory in .../wp-content/mu-plugins/avatars.php on line 1212

This error is annoying because user getting it on every time he clicks the button to reset default avatar.
2. Crop problem (Suggestions – when trying to make blank upload, display Error message)
a. When you don’t make browse into image just click “Users/Your Avatar/Upload” plugin shows “Crop tool”
b. Trying to “Crop” Wordpress backend interface, got an error (default avatar dissapers – shows black avatar):

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in …/wp-content/mu-plugins/avatars.php on line 871
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in …/wp-content/mu-plugins/avatars.php on line 881
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in …/wp-content/mu-plugins/avatars.php on line 891
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in …/wp-content/mu-plugins/avatars.php on line 901
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in …/wp-content/mu-plugins/avatars.php on line 911

The same problems occurs with Blog Avatar too.
Matew

• Andrew

Hiya,

I'll look into these tomorrow. Btw, check the memory limit setting in your php config. That's most likely the reason for your first error.

Thanks,
Andrew

• ndrwld

Thanks Andrew,
Increasing memory limit in wp-settings.php from 32M to 64M solved the problem with big images convertion.
Few more suggestions:
1. High dimension image is in full size when cropping -> is it possible to resize it, by setting maximum resolution in "Crop" mode? (for example 800x600px)
2. It would be really useful to have the Reset button when cropping image.

I still think that there must be set restriction with maximum image size when uploading. If users will upload big size images, and it will not be converted into thumbnail's, just stored on in avatars folder (as described in my previous post), this will lead to server storage problem.
Matew

• drmike

Insert rant about screwing kids at brueggers.

I still think that there must be set restriction with maximum image size when uploading.

If you allow the uploading of videos, you;re screwed as those are larger than what most images would be. If you don't, you can set this in your php.ini file I would think. There is that check in Site Admin -> Options -> File upload size (or whatever it;s called) but I don't know right off if that's applied to the avatar upload. (or in fact to the custom header image come to think about it.)

• ndrwld

Site Admin -> Options -> File upload size doesn't work for this plugin (it works only with BuddyPress native avatars).
The suggestion about maximum image size for avatar creation limit comes form second situation.
What if user uploads 3mb or 5mb image, crops it, but thumbnail creation fails because of low PHP limit (64M). The uploaded image is still in wp-content/avatars/... folder, and the only way to delete it is to do it manually by FTP Client.

1. High dimension image is in full size (e.g. 2000x1200px) when cropping -> is it possible to resize it, by setting maximum resolution in "Crop" mode? (for example 800x600px)

BuddyPress avatars plugin (bp-core-avatars.php) does this, I think you can look into its code for second release.

• ndrwld

One more problem.
The avatars are not displayed in Dashboard/Recent Comments Wigdet.
Generated HTML code:
<img height="50" width="50" class="avatar avatar-50 avatar-default" src="http://project.test/1728/wp-content/default-avatar-50.png" alt=""/>
Matew

• drmike

I'm trying to figure out what the '1728' is and where it;s coming from.

• ndrwld

It's just subfolder - I'am testing WPMU 2.7.1 and this is revision number.
But this problem happens in stable version too.

• drmike

That makes sense. First question that comes to my mind is is the default avatars in place? They are in the wp-content folder and not somewhere else, right?

• Andrew

Hi Guys,

The issue is with the image size. I've got the Avatars plugin on my list for next week.

Thanks,
Andrew

• Damon Cook

I'm having similar issues, but don't currently have access to log for messages. I can upload an image and get to the crop screen and when I hit Crop Image button the crop form goes away, but nothing happens.

Here is the URL that is available after hitting Crop Image button: <site>/wp-admin/users.php?page=user-avatar&action=crop_process

Thanks,
Damon

• Andrew

Hiya,

My guess is that there's an error that's keeping it from continuing. Can you contact someone who has access to the error log?

Thanks,
Andrew

• drmike

Excuse me, that's screaming kids at Brueggers.

• ndrwld

Nevermind, are there any news about new plugin release?

• Andrew

No news on any plugin updates at the moment. We'll post here in the forums when there's an update.

Thanks,
Andrew

• amg

Hi, I have understanding error by new members, and d'not know where to solve it.

Warning: Missing argument 5 for bp_core_fetch_avatar_filter() in /home/scopex.nl/public_html/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php on line 345

• Aaron

Please make sure you are not using our avatars plugin with BuddyPress. BP has it's own avatar system so they are incompatible.