PHP Code:
$profilefieldname="field$profilefield[profilefieldid]";
if(strstr($profilefield[title], "Picture") and $userinfo[$profilefieldname]) {
error_reporting(0);
$img_info = getimagesize($userinfo[$profilefieldname]);
if($img_info[0]) {
if(($img_info[0] <= 640) and ($img_info[1] <= 480)) {
$profilefield[value]="<img src=\"$userinfo[$profilefieldname]\">";
}
else {
$xratio = $img_info[0] / 640;
$yratio = $img_info[1] / 480;
$factor = $xratio;
if($yratio > $xratio) {
$factor = $yratio;
}
$xsize = intval($img_info[0] / $factor);
$ysize = intval($img_info[1] / $factor);
$profilefield[value]="<img src=\"$userinfo[$profilefieldname]\" width=\"$xsize\" height=\"$ysize\">";
}
}
else {
$profilefield[value]="Invalid image link: <a href=\"$userinfo[$profilefieldname]\">$userinfo[$profilefieldname]</a>";
}
$profilepic = $profilefield[value];
}
else {
$profilefield[value]=$userinfo[$profilefieldname];
}
eval("\$customfields .= \"".gettemplate("getinfo_customfields")."\";");
Then you can use
$profilepic in your template.