This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Change size image

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #48410
    webmaster123webmaster123
    Participant

    Hello,

    I made a annuaire using your Staff search and filter and i would like to change the resolution of the image for each People.
    For the moment its using 96*96 thumbnail (/wp-content/uploads/2024/05/cropped-cropped-cropped-femme2-96×96.jpg)

    i tried, to change the “Featured image size source” but its not working.
    Is it possible to make the size bigger using another method ?

    #48415
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    May I ask what type of results are these? Posts, pages or other post types or something else?

    For post types the default “Original size” is used by default. If that option is not changing the size, then the files either doesn’t exist or for some reason WordPress is not returning them – it could be a custom code or a plugin changing what’s returned when requesting the images.

    #48425
    webmaster123webmaster123
    Participant

    Hello,

    Sorry I didn’t specify it, but i’m using users
    U can see the screen of my settings as an attachment

    #48438
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thank you!

    Indeed, the size is not respected in the avatars case, I can confirm this should be adjustable. As a temporary solution I have made a small custom code snippet – but I have noted this on the bug tracker and resolve it for the upcoming release.

    add_filter(
    	'asp_results',
    	function ( $results ) {
    		foreach ( $results as $r ) {
    			if ( $r->content_type === 'user' ) {
    				$r->image = get_avatar_url(
    					$r->id,
    					array(
    						'size' =>512,
    					)
    				);
    			}
    		}
    		return $results;
    	},
    	10,
    	1
    );

    Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

    #48439
    webmaster123webmaster123
    Participant

    Thx a lot, its working perfectly 🙂

    #48440
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

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