OG Image not using full resolution on page – only scaled version appears

#1103747
  • Sven Sewcz
    Rank Math free

    Hello Rank Math Support,

    I have an issue with the Open Graph images on my WordPress site. I uploaded a high-resolution OG image (2400px width), but when I view the page source, Rank Math outputs only the scaled version (e.g., 1024×538).

    I want Rank Math to always use the original full-size image for OG tags so that Facebook and other social platforms display the high-resolution image.

    Could you please guide me on how to configure this in Rank Math, or if a custom snippet is required in functions.php?

    Site URL: https://reichert24-7.de/
    OG Image URL: https://reichert24-7.de/wp-content/uploads/2025/09/fb-og-img.jpg

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    We apologize for the issue you are facing with the Open Graph images on your site. To ensure that Rank Math uses the original full-size image for OG tags, please follow these steps:

    1. Check Image Settings in Rank Math:

      • Go to the post or page where you have set the OG image.
      • In the Rank Math Meta Box, ensure that you have selected the high-resolution image (2400px width) as your Facebook sharing image.
      • Make sure that there are no other settings or plugins that might be resizing or compressing your images.
    2. Image Dimensions:

      • Facebook recommends using images that are at least 1200px x 630px for optimal display. Since your image is 2400px wide, it should meet this requirement, but ensure that it is not being resized by any theme or plugin settings.
    3. Check for Caching:

      • If you are using a caching plugin, clear your cache after making changes to ensure that the latest version of your page is served.
      • Also, check if any CDN (Content Delivery Network) is serving a cached version of your images.
    4. Testing with Facebook Debugger:

      • Use the Facebook Sharing Debugger to scrape your URL again. This will help Facebook recognize the updated OG tags and images.
      • Click on the Scrape Again button to refresh the data Facebook has for your URL.

    If after following these steps, you still encounter issues with the OG image resolution, it may require a deeper investigation into your theme or other plugins that could be affecting image output. In such cases, we recommend reaching out to our support team directly through your ticket for more personalized assistance.

    Thank you for raising this concern, and we hope this helps resolve your issue!

    Sources:
    Open Graph/Social Preview Image Is Not Displayed » Rank Math
    Open Graph/Social Preview Image Is Not Displayed » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Hello,

    Please note that the image you’re using should be as close as 1200 x 630 pixels as per OpenGraph Standards:
    https://rankmath.com/kb/open-graph-image-not-displaying/#num-4-2-image-dimensions-image-format

    This will keep the image resolution and avoid getting cropped when displaying on the Social Media apps.

    Looking forward to helping you.

    Hello,

    thank you for your feedback and the reference to the Open Graph standards.

    We have indeed always uploaded our OG images in the recommended size of 1200 × 630 px. However, we noticed that on Facebook the quality of these images often looks very poor and pixelated.

    Based on my research, I would like to test using an image with exactly double the size (2400 × 1260 px) to see if this results in a sharper display on Facebook, since platforms usually downscale large images but keep a higher quality when starting with a bigger source file.

    My question is:
    Is there a way to configure Rank Math so that the original full-size image (in this case 2400 × 1260 px) is always used in the OG tags, instead of the automatically scaled 1024 px version? Or would I need to apply a custom filter/snippet in functions.php to achieve this?

    Hello,

    Please try using this filter code to avoid the social or OpenGraph image getting resized:

    add_filter( "rank_math/opengraph/facebook/image", function( $attachment_url ) {
    	global $post;
    	if(is_front_page() || is_home()){
    		$attachment_url = get_post_meta($post->ID, 'rank_math_facebook_image', true);
    	}
    	return $attachment_url;
    });

    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Please note that this code only applies to your homepage.

    Let us know how that goes. Looking forward to helping you.

    Hello Jeremy,

    thank you for your support. The code works perfectly on my homepage. I will test how Facebook displays the higher resolution image with the next post and will share my feedback on the results.

    Best regards,
    Sven

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this ticket.