Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Images are not using the site url WordPress


Hi There,

We are using a Wordpress theme with the plugin Visual Composer.

When I upload an image and insert in a text area the src is cutting off the root domain.
Example: src="../wp-content/uploads/2013/10/plectrums.jpg"

Where it should be src=""

Anyone fancy having a look at this for me.

URL in screenshot.

Many Thanks

Answers (8)


Fahad Murtaza answers:

Can you check your general settings if the site URL is correct.

WordPress Address (URL)
Site Address (URL)

In general settings. They should both point to site's root link.

Fahad Murtaza comments:

Looks some some custom plugin or filter is updating the image path. It shouldn't be relative at all. Can you try disabling plugins one by one and see if inserted images gets correct path. I am quite sure it has to do with a plugin or setting in your theme if not the WordPress Address (URL) and Site Address (URL) in gerenarl settings are correct and don't have a trailing slash '/'

Fahad Murtaza comments:

The issue was with the plugins. I narrowed down to visual editor. Its fixed now.

You just need to add the images again and it will insert the correct url i.e absolute one.


zebra webdesigns answers:

Hello Jim

Can you provide the access to the site if possible


Aezaz Shaikh answers:

Check if your site url and home url is not blank.
Goto settings-> general from backend and check home url and site url is not blank or wrong.

Hope this helps.


Balanean Corneliu answers:

The right place of images is here :

Balanean Corneliu comments:

and now can be the folder /12/ i think if is like the other ones


Arnav Joy answers:

which plugin you are using?


akhilesh singh answers:

Hi jim
try to add this code in your themes function.php

function fix_relpath($the_content){
return str_replace('href="../', 'href="http://YOURDOMAIN.COM/', $the_content);
add_filter('the_content', 'fix_relpath');

replace YOURDOMAIN.COM with your domain name

this will show your images on your site.


Hariprasad Vijayan answers:


Make sure that your WordPress Address (URL) and Site Address (URL) are "" from your dashboard.


Vidyut Kale answers:

Check to see if you haven't got a plugin modifying urls to make them relative. Failing that, are these images from a migrated site? If yes, other things to try. Do update.