Closed chrome-cgi closed 4 years ago
@chrome-cgi Thank you for reporting this. I've verified the problem, however, your code snippet didn't work for me. We'll take a look and implement improvements to how we handle sites where WordPress is installed in its own directory.
@chrome-cgi I tried reproducing the issue using these steps (first method) and the image path was correct - https://wordpress.org/support/article/giving-wordpress-its-own-directory.
Is your site configured using that method? If so, please note that you shouldn't rename your site URL/home URL in that case. Feel free to let us know if you set up your site in a different way, but for now I'm going to close the issue.
Describe the bug
When the home URL contains path, such as:
and the post contains custom/external image,
the image URL in post-sitemap.xml is generated incorrectly:
Expected result is like this:
Possible Fix
You need to be aware of the path of home_url in absolutize_url()
Version Info (please complete the following information):