SEOmatic not merging fields from a related entry I have a pretty specific set up: posts get created via rss feeds and images are not attached to the specific posts, so instead in the entry template I use an image from a related entry. When I try to use the related entry's image as the SEO image and merge it with SEOmatic, it does not merge.

Has anyone ever tried doing this with SEOmatic? This is the code I'm using:

{% if craft.entries.section('episode') %}
   {% set relatedPodcastImage = craft.entries.section('podcastChannel').relatedTo(entry).albumCoverPicture.first().getUrl('large') %}
      {% set seomaticMeta = seomaticMeta | merge(
            { og:
                  {
                  title: entry.title,
          description: entry.podcastDescription,
                  image: relatedPodcastImage
                  }
            },
        { twitter:
                  {
                  title: entry.title,
                  description: entry.podcastDescription,
                  image: relatedPodcastImage
                  }
            }
      ) %}
{% endif %}
Make sure you're not doing this inside of a {% block %} or you will run into Twig Processing Order / Scoping issues.

There are some good examples of doing that here: Dynamic Twig SEO Meta