The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Avatar Manager
[resolved] Change upload dir (3 posts)

  1. lukaszwiecek
    Posted 3 years ago #

    You could add in the settings can set the directory where avatars are stored (for example /wp-content/uploads/avatars/)?

    It is also transmitted to rename files on more unique, for example, instead of my-photo.jpg change the name of the user-51.jpg (user ID).

    Best regards
    Lukasz Wiecek


  2. Cătălin Dogaru
    Plugin Author

    Posted 3 years ago #

    Hi Lukasz,

    Thank you for using the Avatar Manager plugin.

    Current implementation lets WordPress handle avatar uploads so they are stored in the uploads folder; an avatar image is just a regular attachment with some extra meta information (like a header or a background image). But this doesn't mean that you can't retrieve them; you can run a custom query by avatar_manager_custom_avatar meta key for users, or _avatar_manager_is_custom_avatar meta key for attachments.

    For example:
    $args = array( 'meta_key' => 'avatar_manager_custom_avatar' );
    $users = get_users( $args );

    foreach ( $users as $user ) ehco $user->avatar_manager_custom_avatar . PHP_EOL;

    In the above example, the value of $user->avatar_manager_custom_avatar is the attachment ID of the custom avatar image used by each user.

    Let me know if this helps.

    Best regards,
    Cătălin Dogaru

  3. Cătălin Dogaru
    Plugin Author

    Posted 3 years ago #

    Because the plugin relays on WordPress upload mechanism, changing the upload directory is not possible with the current implementation. Closing the ticket as wontfix or maybelater.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Avatar Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic