Support » Plugin: GEO my WordPress » Members Locator only shows an enlarged thumbnail as an image

  • Resolved Reiner

    (@reiner1)


    Hello,
    Members Locator only shows an enlarged thumbnail as an image
    How can I set that not the thumbnail but the avatar is displayed in the correct size?
    In the link a picture of the bad representation.

    Picture Link

    Here the Html Code

    <img loading="lazy" src="https://www.my-domain.de/wp-content/uploads/avatars/614/5e0126d45512f-bpthumb.jpg" class="avatar user-614-avatar avatar-180 photo" alt="Profilbild" width="180" height="180">

    • This topic was modified 2 months, 3 weeks ago by Reiner.
    • This topic was modified 2 months, 3 weeks ago by Reiner.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Eyal Fitoussi

    (@ninjew)

    Hello @reiner1,

    You can try the script below ( add it to the functions.php file of your theme ):

    
    function gmw_fl_info_window_modify_image( $output, $member, $args, $gmw ) {
    
    	if ( 'fl' !== $gmw['prefix'] ) {
    		return $output;
    	}
    
    	$output['image'] = bp_core_fetch_avatar(
    		array(
    			'item_id' => $member->ID,
    			'type'    => 'full',
    		)
    	);
    
    	return $output;
    }
    add_filter( 'gmw_info_window_content', 'gmw_fl_info_window_modify_image', 50, 4 );
    

    The script should output the ‘full’ avatar size rather than the ‘thumb’. You should then be able to better adjust the size using CSS.

    I hope this helps.

    Thread Starter Reiner

    (@reiner1)

    Many thanks,

    the solution is perfect and works well.

    Greetings and have a nice day.

    Reiner

    • This reply was modified 2 months, 2 weeks ago by Reiner.
    Plugin Author Eyal Fitoussi

    (@ninjew)

    You are very welcome, @reiner1.

    Thread Starter Reiner

    (@reiner1)

    Hello @ninjew

    I would like to have the avatar a little smaller for the card, (100x100px)
    In which CSS file do I have to insert which CSS condition?

    Greetings
    Reiner

    Plugin Author Eyal Fitoussi

    (@ninjew)

    @reiner1,

    Try this CSS. My advice is to place it in the theme Customized ( under the Additional CSS section ).

    
    .gmw-info-window.fl img {
        width: 100px;
        height: 100px;
    }
    
    Thread Starter Reiner

    (@reiner1)

    Thank you,

    now everything is perfect …

    Many greetings

    Reiner

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.