• Resolved coopersita

    (@coopersita)


    Is there a filter I could use to change the size of the image. I want to use the “medium” size.

    Also, I don’t know if this is how the plugin works or if something is wrong with my site, but the uploaded images are saved to the uploads folder, but don’t appear in the media library. I had to use another plugin to recover them (add them to the db as attachments).

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @coopersita,

    Thank you for using Basic User Avatars.

    You should be able to use the filter basic_user_avatar_data and tweak the return_args to adjust the size when outputting the image. Here is a link to the function and filter – https://github.com/strangerstudios/Basic-User-Avatars/blob/master/init.php#L140-L233C26

    The user’s avatars don’t get added to the media library as it may clutter your media library. The plugin will try to automatically delete. the user’s avatar when they upload a new one to help keep things clean.

    I’m glad to hear you resolved this by using another plugin.

    Thread Starter coopersita

    (@coopersita)

    Thanks for the reply. I’ll give that a try. The problem is that the generated square images are cropped, and most of them are cropped so that half the head is missing. My guess is that it’s cropping from the top and bottom, when it should crop from the bottom (crop off the chest, but not the head).

    We have added in the filter basic_user_avatars_default_size that takes an integer value of the default crop size when uploading an avatar.

    You may need to also tweak the output of the avatar on the frontend of your site to match this new crop size.

    If you need help writing custom code and tweaking this further, please reach out to a local WordPress developer or freelancer. I hope this helps get you started.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filter for resizing’ is closed to new replies.