WordPress adding absolute paths
-
Hi,
I am trying to use this with wordpress 4.4 and Azure hosting. The plugin generates the following code (notice the d:homesitewwwroot it is adding):
<img width="36" height="36" src="https://static.mywebsite.com/website/myaction_express_menu_icon-36x36.png" class="attachment-menu-36x36 size-menu-36x36" alt="myaction_express_menu_icon" srcset="https://www.mywebsite.com/wp-content/uploads/D:homesitewwwroot/wp-content/uploads/myaction_express_menu_icon-50x50.png 50w, https://www.mywebsite.com/wp-content/uploads/D:homesitewwwroot/wp-content/uploads/myaction_express_menu_icon-75x75.png 75w, https://www.mywebsite.com/wp-content/uploads/D:homesitewwwroot/wp-content/uploads/myaction_express_menu_icon-24x24.png 24w, https://www.mywebsite.com/wp-content/uploads/D:homesitewwwroot/wp-content/uploads/myaction_express_menu_icon-36x36.png 36w, https://www.mywebsite.com/wp-content/uploads/D:homesitewwwroot/wp-content/uploads/myaction_express_menu_icon-48x48.png 48w, https://www.mywebsite.com/wp-content/uploads/D:homesitewwwroot/wp-content/uploads/myaction_express_menu_icon.png 80w" sizes="(max-width: 36px) 100vw, 36px">
As you can see, it adds the right src url, but the whole srcset is wrong. I did try to understand whats going on by doing the following:
1. Search if the plugin is responsible for the srcset (I think it’s not)
2. Check the usage of wp_get_attachment_image_src() (might be, but what is causing this?)
3. Tried customizing the path in the wp-config.php (using define(‘UPLOADS’, ‘wp-content/uploads’);)Nothing seems to work. Happy to do a PR, but it would be great if you could give me some points that might help finding this issue.
- The topic ‘WordPress adding absolute paths’ is closed to new replies.