WordPress.org

Ready to get started?Download WordPress

Forums

How do I create a simple image url? (7 posts)

  1. rustybulb
    Member
    Posted 5 years ago #

    Hi,

    I need to host an image on my wp blog and put the url within an affiliate link.

    So I was hoping I could have a link that looked like this:

    http://www.mywpblog.com/images/pic001.jpeg

    I uploaded the image to the images folder but it didn't work.

    So I looked at 'View image' on someone else's wp blog and the image was on a page with the longest, most complicated url I ever saw!

    How do I do this simply please? I don't want to host the image somewhere else.

    Thanks

  2. stvwlf
    Member
    Posted 5 years ago #

    Hi

    If your image is in the typical place on your blog, the URL will be
    http://mywpblog.com/wp-content/uploads/pic001.jpeg

    If you put this in your theme's image folder the url would be
    http://mywpblog.com/wp-content/themes/{themename}/images/pic001.jpeg

    If I was doing this and the image was directly accessible around the web, I would use the URL you are hoping to create. To do that you have to create a folder called images under the webroot. The WordPress media uploader is not gonna see that location, so you would have to manually type in that URL where you want it in WP posts.

  3. rustybulb
    Member
    Posted 5 years ago #

    Thanks for your reply.

    I tried the two URL examples you gave me:
    http://mywpblog.com/wp-content/uploads/pic001.jpeg
    and
    http://mywpblog.com/wp-content/themes/{themename}/images/pic001.jpeg

    but I still got 'No Page Found' when I typed those urls in the box (with my details in obviously).

    Perhaps I should mention that the image is supposed to be a static ad on the right panel, not within a post. I uploaded the image via Filezilla to the folders you mention.

    Also, I would try the third option but I could not find the 'webroot' in Filezilla.

    How do I access the Webroot please?

    Thanks

  4. rustybulb
    Member
    Posted 5 years ago #

    OK I found out the webroot is public_html.

    That takes me back to the beginning. I already put the image in the images folder within public_html to start with and it didn't work. Just tried it again to double check.

    Did I misunderstand stvwlf's advice?
    Or is there another way of making an image url?

    On a normal website, I'd know how to do this. How come WordPress is different?

    Thanks a lot

  5. rustybulb
    Member
    Posted 5 years ago #

    Still unsolved - thanks

  6. cdembinski
    Member
    Posted 5 years ago #

    If you uploaded your image to public_html/images, you should be able to access with <img src="http://www.yourdomainname.com/images/imagename.jpg">

  7. rustybulb
    Member
    Posted 5 years ago #

    PEBCAK

    Sorry folks - I've been calling an image a .jpeg when it should be .jpg

    Duh.

    Thanks for your help

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags