Skip to:
Content
Pages
Categories
Search
Top
Bottom

import avatars


  • siparker
    Participant

    @siparker

    is there a way to bulk import avatars?

    I moved from Vbulletin to BBpress / buddypress and the importer doesnt pull in avatars or signatures so im trying to figure a manual way to do this.

    I can see that the avatars are saved in the uploads/avatars/{memberid} folder which is simple enough to map but it seems on import to have cropped the image (simple to replicate) and then renamed it 5e960bd5f502cd86b374e5c736f82d15-bpfull for example

    Can i hook into the avatar import process somehow to get the rename working?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I believe 5e960bd5f502cd86b374e5c736f82d15 is just an md5($user_email), so you can easily replicate that too. There is no DB records for users avatars, so it’s safe to put images of proper names in proper places.

    I was wrong, it’s wp_hash( $absolute_path . time() ). So it becomes harder…

    But there are bp_before_bp_attachment_crop_args_parse_args and bp_after_bp_attachment_crop_args_parse_args filters (search for 'bp_attachment_crop_args' string).

    So you can hook there and modify $args['dst_file'].

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘import avatars’ is closed to new replies.
Skip to toolbar