How to use seoSuite twitter:image correctly with Babel and LangRouter

I’m trying to implement the meta tags for twitter in a website using (Babel, Langrouter and) seoSuite.
When I set an image for a page in seoSuite tab, the meta-tag for the twitter image includes the context-key in the path, which is wrong as the assets are not in a context but in the root.
[[!+ss_meta.twitter_image]]
–>
<meta name="twitter:image" content="https://sparknarrowcasting.nl/nl/assets/images/social-previews/Spark-narrowcasting-homepage.png">

How can I prevent the context-key (nl/) from being inserted in the path ?
All other images in the site have relative paths, but this one should be absolute.

It seems the image path is prepended with the url of your homepage here in the code:

Maybe you can change the code and just use the site_url or alternatively you could create a custom output modifier that removes the unnecessary part from the url.

<?php
return str_replace('/nl/','/',$input);
1 Like

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.