• Good day,
    I want to resize the avatar of a user in home page but everytime i resize it, it became pixelated.
    Is there any way to call an image in rencontre_mini_portrait.php?
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jacques Malgrange

    (@sojahu)

    Hi,

    The photo used in mini_portrait is a 60×60 image. It is small and will be pixelated if you enlarge it.

    You can use another larger photo that is 250×250 by replacing -mini with -grande in the photo name.

    You can also create a custom format using the rencImgSize filter. See Développeur page (French).

    In rencontre_mini_portrait.php, Image SRC is a variable. You need to change it to get your new image :

    // 1. IMG SRC
    $a = '/portrait/'.floor(($u->ID)/1000).'/'.Rencontre::f_img(($u->ID*10).'-grande');
    $src = $rencDiv['baseurl'].$a.'.jpg?r='.rand();
    
    // 2. Call new SRC : Replace :
    <img class="w3-circle" style="width:<?php echo $photoWidth; ?>px;" src="<?php echo $u->miniPhoto; ?>"
    // With :
    <img class="w3-circle" src="<?php echo $src; ?>"
    
    // 3. Remove webp format : replace :
    <?php if(!empty($u->miniPhotoWebp)) { ?>
    // with
    <?php if(0) { ?>
    

    Regards

    Thread Starter johnrei

    (@johnrei)

    Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pixelated Avatar in Home page’ is closed to new replies.