Set user profile using content service

I’m working on a confluence server app in which I need to set the user profile picture:

AttachmentManager attachmentManager = ...
PersonalInformation personalInformation = ...
Attachment picture = attachmentManager.getAttachment(personalInformation, fileName);
personalInformation.addAttachment(picture)

The problem is that AttachmentManager.getAttachment() is deprecated, so that I tried to update the profile picture by using ContentService.create and set PersonalInformation as the container of the attachment. But I got the error below:

The entity PersonalInformation is not ContentConvertible or API available

Look like updating user profile picture using content service is not supported at the moment or am I missing something?