0

I have images uploaded to a WordPress site and they can be accessed by the following URL:

http:/eatdrink.ca/content/uploads/2014/09/FoodWebSummer-main-420x194.jpg

but WordPress is giving the following URL:

http://eatdrink.ca/wp/http:/eatdrink.ca/content/uploads/2014/09/FoodWebSummer-main-420x194.jpg

Why is that extra http://eatdrink.ca/wp/ being thrown on at the beginning? It shows this file URL on the edit media screen and from the front end, so no images are showing, meanwhile they are there.

The path in the database shows the correct image path and the GUID of the media post is also the correct one:

http:/eatdrink.ca/content/uploads/2014/09/FoodWebSummer-main-420x194.jpg

How does WordPress generate the File URL? I could not find that value in the database, so I assume WordPress handles generating it in code.

It seems to be throwing the WordPress Address (From General Settings) in front of the image path.

Does anyone know why WordPress would be doing this?

1
  • I ran into a similar problem with a particular image uploading plugin where it was prepending the base URL to a value that already had the full URL. Are you using any plugins that are related to uploading this image?
    – KnightHawk
    Aug 17 '16 at 18:55
1

Because you only have one slash instead of two in your URL:

http:/eatdrink.ca

That double slash ain't just for looks. :)

Go to the hidden options.php page located at /wp-admin/options.php. Check and see what the "upload_url_path" is set to. Make sure it has a double slash there (if it's empty, that is acceptable as well, don't change it away from being empty). Don't change anything else while you're here.

Also check the URL's on the Settings->General page. Make sure they have the proper number of slashes as well.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.