Home Forums Space themes support forum increase article author avatar size

increase article author avatar size

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #627645

    craig-7256
    Participant

    Hello,
    Please can you help me increase the article author avatar size

    Attachments:
    You must be logged in to view attached files.
    #627774

    Luke Nielsen
    Keymaster

    Hello,

    Use the code below for help, define it in Theme Settings -> Custom CSS.

    body .xts-post-author .avatar {
      max-width: 80px;
      width: 80px;
    }

    Kind Regards

    #627944

    craig-7256
    Participant

    This is great. Thank you.

    However, the source Gravatar image resolution is much higher on Gravatar https://gravatar.com/brilliantcreate and is very low resolution on the website https://staging.spasolution.co.uk/pricing/

    Do you know if it is possible to manage the avatar image size/resolution?

    Attachments:
    You must be logged in to view attached files.
    #628028

    Luke Nielsen
    Keymaster

    Hello,

    Paste the code below in the functions.php file in your child theme.

    if ( ! function_exists( 'xts_change_avatar_size_data' ) ) {
    	function xts_change_avatar_size_data( $args, $id_or_email ) {
    		$args['size'] = 120;
    		$args['height'] = 120;
    		$args['width'] = 120;
    		$args['url'] = preg_replace( '/(\?|&)s=\d+/', '${1}s=120', $args['url'] );
    		return $args;
    	}
    	add_filter( 'get_avatar_data', 'xts_change_avatar_size_data', 10, 2 );
    }

    Then check how it works.

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)