X
X
xlo2402021-07-30 12:53:48
WordPress
xlo240, 2021-07-30 12:53:48

How to get a large user avatar image?

With this code, I get the user's avatar image.
$url_avatar = get_avatar( $current_user->ID );
However, it outputs a Link for a small avatar. How to display a link for a large avatar?
6103cc028a650212382349.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Alyoshin, 2021-07-30
@ArchitectOfRuin

The get_avatar function supports the $size attribute, which will be the width and height in pixels. Because you don't set it, the default is 96 pixels.
Read more: https://developer.wordpress.org/reference/function...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question