hello im trying to see if its possible to change the

#514590
  • Resolved Maxime Marquette
    Rank Math free

    og:image:width
    og:image:height

    by default set in the plugin

    because on some old article i didnt had a og:image and its put the image but with 6xx x 450 or something like that i want to overrun that because i use also og:image:overlay and i double check and set everything correctly

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    You can use the following filter to change og:image:width and og:image:height content. It will override the default one:

    add_filter( "rank_math/opengraph/facebook/og_image_width", function( $content ) {
    	$content = '1000';
    	return $content;
    });
    
    add_filter( "rank_math/opengraph/facebook/og_image_height", function( $content ) {
    	$content = '1000';
    	return $content;
    });
    

    Please modify the $content value as per you want.

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.

    Thank you.

    ​​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘hello im trying to see if its possible to change the’ is closed to new replies.