Doubt with avatars

Hello everyone,

first of all, thanks in advance people answering this…

Where are the avatars from the client saved in the Openfire?

I am not using LDAP.

Thanks in advance

Depends on the client.

If it uses XEP-0054 (VCard) to store avatars, they are stored in ofVcard table.

It it uses XEP-0084 (User Avatar), they should be in ofPubsubItem table.

Thanks for the response.

We use “Conversations” client. I am reviewing my Openfire database and unfortunately, nothing is stored in these two tables, so I suppose that the client makes something different to store them ( I am going to review it)

Another question, I saw that Openfire launches an event when it receives the avatar (not always), this one:

“event”, “



Do you know what is necessary for Openfire to launch this event?

Thanks in advance.

Then it’s likely using XEP-0084. I think this event is sent, when a user logs in (sends available presence) or when another contact updates his/her avatar.

Yes, exactly!

What it is happening to us is that, when a contact publishes an avatar, sometimes the client receives this event and sometimes not.

I am going to review the protocol extension you send me (XEP-0084) in order to try to detect what the client is sending in a different way.

Thanks for your help!

Hello everyone,

just if someone read this post in the future, if your client is using “XEP-0084”, there is a table in the openfire database called “ofpubsubsubscription” where the user has the contacts which are “interested” in receiving the avatar metadata.

The column “nodeID” is the user and the columns jid/owner is the contact interested in receiving this info.

I will update the post if I find more interesting info.



thanks for the answers of yesterday, they were very helpful for me.

As I was reading in the specifications (XEP-0084: User Avatar ) :

“The user’s virtual pubsub service would then send the metadata notification to entities that have subscribed to the user’s metadata node or contacts who have advertised an interest in receiving avatar metadata by including a Entity Capabilities (XEP-0115) [8] feature of “urn:xmpp:avatar:metadata+notify””

Do you know where can I find an example of XML in order to say to Openfire "I am a user interested in receiving avatar metadata (of 1 or all roster) "?

Thanks a lot in advance.


That’s funny, we have modified conversations this morning to use vcards to udpate avatars on openfire. Just modifiy the 2 following files., change the default avatar compression with jpeg at line 35:

public static final Bitmap.CompressFormat AVATAR_FORMAT = Bitmap.CompressFormat.JPEG;, replace publishAvatar function with following:

public IqPacket publishAvatar(Avatar avatar) {

final Element vCard = new Element(“vCard”, “vcard-temp”);

final Element photo = vCard.addChild(“PHOTO”);

final Element binval = photo.addChild(“BINVAL”);


final Element type = photo.addChild(“TYPE”);


final IqPacket packet = new IqPacket(IqPacket.TYPE.SET);


return packet;



thanks for the response, yes, it is curious the question in the moment that Conversations have developed the vcard in order to save the avatars

I follow your instructions and now, we are saving the avatar in the vcard table.

Now, in order to get the data of one roster , we have to set this parameters

avatar.origin = “1” --> this means VCARD

avatar.owner --> local part of the roster´s jid

with this child --> packet.addChild(“vCard”, “vcard-temp”);

and send the packet to the server.

Am I right?

Thanks a lot!

XEP-0084 uses “Personal Eventing Protocol”. See XEP-0163.

By default, you are “interested in receiving avatar metadata”, if the contact shares presence with you.

Furthermore you have to signal “real” interest by sending Entity Caps (XEP-0115) in your presence, which includes a feature of “urn:xmpp:avatar:metadata+notify”

This feature is hashed and base64 encrypted with other features you are interested in (see XEP-0115).

That’s funny, we have modified conversations this morning to use vcards to udpate avatars on openfire. Just modifiy the 2 following files.

Uhm, I hope you still have the XEP-0084 method, because it is generally preferrable over XEP-0153/VCard.

just to be clear, we are not in conversation’s team. We are end users, just like you.

We are trying to setup a communication system between our drivers (we do transport) and our office.

We are brand new in the topic actually, so I won’t be able to help you more than that. In our tests, it works well just like that.

We are now going to try to implement file transfers between spark and conversations.

We can provide you the patch when it will be done if you want.