Hello! The issue you’re facing is related to post content. The image URL is part of the post content and the plugin currently doesn’t filter post contents to replace URLs. I’m creating an issue in the plugin repository to add an option for that in a near future, you can follow the updates here: https://github.com/straube/multiple-domain/issues/22.
In the meanwhile, you can add the filter yourself. If you have some basic programming skills, you should be able to open the “functions.php” file of your theme and append a couple lines of code to it:
add_filter('the_content', 'fix_content_for_multiple_domain');
function fix_content_for_multiple_domain($content)
{
if (defined('MULTPLE_DOMAIN_ORIGINAL_DOMAIN') && MULTPLE_DOMAIN_ORIGINAL_DOMAIN !== MULTPLE_DOMAIN_DOMAIN) {
$regex = '/(https?:\/\/)' . preg_quote(MULTPLE_DOMAIN_ORIGINAL_DOMAIN) . '/i';
$content = preg_replace($regex, '$1' . MULTPLE_DOMAIN_DOMAIN, $content);
}
return $content;
}
WARNING: before you go ahead and change your “functions.php” file, I strongly advise you to make a copy/back up of it. This way you can easily roll back the changes in case anything goes wrong.
You may also refer to the WP reference on “the_content” filter: https://developer.www.ads-software.com/reference/hooks/the_content/