Restrict VCard Image size and resolution

Hello,

I know the recommended size and pixels for vcard avatars but bigger images like 256x256, can be sent to server. I dont want to users send big avatars. So, I want to restrict this but i cant find the options on web console and system properties. Is there any way to do this?

It seems best to me to handle size limits on the client end of the profile editor, since the server simply stores the base64 version of the image it receives from the client. Do all your users use the same client (like an enterprise setup), or is your setup more like a community? You may be able to add an arbitrary limit to the length of the base64 encoded image, or even deserialize the image to check its dimensions (but this is overkill).

This feature isn’t easily implemented as far as I can see.

Jeff

It is like a community. Many users connect to the server.

I’m developing android xmpp client by smack libraries. Users login to openfire server by the android app. So I can limit avatar on client side but somebody can send big images by a simple java program. I don’t want users abuse that. Is there any default limit like 1 mb?

How can i limit the base64 encoded image?

Thanks.

You can not limit the base64 image nor the other elements (nickname, telephone, …). You could dump the OFVCARD table regulary and look for really big entries.

Or write an Openfire plugin which checks the size of the vcard before storing it.