WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. lukaszwiecek
    Member
    Posted 1 year 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

    http://wordpress.org/extend/plugins/avatar-manager/

  2. Cătălin Dogaru
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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

About this Topic