Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mike

    (@mgsisk)

    There’s no administrative option for this, but you can use the webcomic_opengraph filter to change any of the OpenGraph tags Webcomic adds. Assuming you set the cropped image as the Webcomic post thumbnail, you could do something like this:

    function custom_webcomic_opengraph($output, $object, $collection) {
      // Only filter for individual Webcomic posts.
      if (!is_singular() || !$collection) {
        return $output;
      }
    
      // You can optionally specify a size, like get_the_post_thumbnail_url('large')
      $output['og:image'] = get_the_post_thumbnail_url();
    
      return $output;
    }
    
    add_filter('webcomic_opengraph', 'custom_webcomic_opengraph', 10, 3);
    Thread Starter lpritch

    (@lpritch)

    How can I set the cropped image as the Webcomic post thumbnail? The usual Featured Image box doesn’t appear as an option on the Edit Webcomic page. I am using Inkblot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Thumbnail of webcomic as open graph image’ is closed to new replies.