Hello-
I have successfully set-up a single author page using author.php which displays custom user fields. One of the items displayed is the users profile image. In order to display this image I have used the following code used from a combination of Toolset support threads and the wordpress.org support forums.
<?php
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
echo types_render_usermeta( 'rabbit-profile-photo', array( "user_id" => $curauth->ID ) );
?>
This successfully displays the custom user meta field I created which an image upload field for the profile photo.
The issue is that I need to display specific cropped dimensions. Because I am rendering the image with 50% border-radius in CSS to create the image a circle. For the types_render_field I use the following from your documentation:
types_render_field( "my-image", array( "alt" => "Profile Photo", "width" => "500", "height" => "500", "resize" => "crop" ) )
How do I display this using types_render_usermeta?
Thank you for your help.
Going to answer my own question here:
<?php
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
echo types_render_usermeta( 'rabbit-profile-photo', array( "alt" => "Rabbit Profile Photo", "width" => "500", "height" => "500", "resize" => "crop"), array( "user_id" => $curauth->ID ));
?>
This worked fine.