Can not add profile image

I can not seem to add a profile image to user accounts. This happens with my own account and with a newly created user account. After choosing an image the browser window just flashes, i don’t get the usual green smiley face or red angry face. I’m trying a PNG image and the issue was with Kirby 2.5.2 but i also get the issue with 2.5.4.

I am using Opera browser. I thought it might have been something to do with its built in Ad blocker, but i get the same problem with it disabled.


Edit: get the same issue in Chrome

Looking at the server log, seems theres a 500 error when the user edit form tries to post. Curious. - - [02/Aug/2017:16:35:10 +0000] "POST /panel/users/manofsteel/avatar?csrf=F5Gmp8ioY8ZlDDs6Voxiy7YfR4qGDCRg HTTP/1.1" 500 575 "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 OPR/46.0.2597.57"

Hm, I can’t reproduce this issue in Chrome. Is that on a local or remote server? Can you provide some more information about your environment, OS, PHP version etc.? Image size?

Sure. It’s a local server running Ubuntu 16.04 (Vagrant Scotchbox Pro + Multisite ), PHP 7.0. The image is just a 300px x 300px PNG file thats only 10kb.

It’s a bit huge to post here but happy to DM you a copy of the PHPinfo output if it helps.

And I guess you don’t have any problems with uploading other images, i.e. to pages?

Nope, no problems at all with any of that. Ive tried other images of a similar size, i don’t think its a dodgy image.

Does the avatar folder exist and is it writable?

Doh! Now I feel silly. The avatars folder was missing. It works now. However, I think Kirby should have handled the error better with some kind of feedback to the user.

Usually, Kirby checks if the folder exists when you install the Panel. But somehow it seems that people loose the folder at some time. But yes, a check could be useful.