• Resolved mairag

    (@mairag)


    Hi, is there a way to select the default OG image (other than the favicon), similar to Yoast SEO option?

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi @mairag,

    There are several ways to currently input a custom fallback image.
    This can however (for now) only be done through using filters; a free extension is planned to add one within the WordPress user interface.

    This is the current order of the image callback:

    1. Featured image.
    2. Fallback filter 1
    3. Header image (if theme supports it)
    4. Fallback filter 2
    5. Site Icon

    In 2.8.0 (December~January) this order is planned:

    1. Featured image.
    2. Fallback filter 1
    3. Header image (if theme supports it)
    4. Fallback filter 2
    5. Theme/Site logo (WordPress 4.5+)
    6. Fallback filter 3
    7. Site Icon

    I believe you’re looking for Fallback filter 2.

    This is how the code should look like, where you replace the URL (within the quote marks) with your preferred image location. This URL needs to be a fully qualified URL, so the domain name and “http” need to be included.

    add_filter( 'the_seo_framework_og_image_after_header', 'my_social_image_fallback' );
    function my_social_image_fallback() {
    	return 'https://example.com/path/to/my/image.jpg';
    }
    

    You can add the code to your theme’s functions.php file.

    I hope this helps :). Cheers!

    Thread Starter mairag

    (@mairag)

    Awesome! Thanks so much for the fast reply, loving the plugin so far…

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @mairag,

    Good news! The post/page/cpt image uploader has been implemented ?? I hope you like it!

    The site-wide fallback (default) image uploader is planned for 2.9.0.

    Have a great weekend!

    Thread Starter mairag

    (@mairag)

    Awesome news, thanks!!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Open Graph default image.’ is closed to new replies.