WordPress.org

Ready to get started?Download WordPress

Forums

Click on thumbnail to enlarge (13 posts)

  1. FranceFan
    Member
    Posted 8 years ago #

    I've used the UPLOAD function in WordPress to upload a photo and creat a thumbnail. I can use the IMG code generated by the UPLOAD command to display the photo in a post and I can also put "thumb-" in front of the filename to display the thumbnail in the post.

    My question is: What do I need to do different so that when someone clicks on the thumbnail, it comes up with the full photo (in another window, or whatever is easiest).

    Thanks for any suggestions,
    Doug Stewart

  2. winterwish
    Member
    Posted 8 years ago #

  3. Dgold
    Member
    Posted 8 years ago #

    You just wrap the a href code around your thumbnail <a href="http://yoursite/yourphoto.jpg">YOUR-THUMBNAIL IMAGE-CODE</a>

    the href is to the large JPG
    the img src is to to thumbnail that shows in your post

  4. FranceFan
    Member
    Posted 8 years ago #

    I tried this, but not sure if I got it right. The thumbnail appears, but when I click on it, I get the error message "404 The requested document was not found on this server".

    Could you look at the following and let me know if I've got the format right?

    <img src='http://france-property-and-information.com/french-property-blog/wp-content/images/thumb-FrenchPropertyStables1.jpg' alt='Stable Floor-1' />

  5. FranceFan
    Member
    Posted 8 years ago #

    Ops, for some reason only some of the code appeared. I'll try posting again using backticks (please ignore the backticks)

    '<img src='http://france-property-and-information.com/french-property-blog/wp-content/images/thumb-FrenchPropertyStables1.jpg' alt='Stable Floor-1' />'

  6. FranceFan
    Member
    Posted 8 years ago #

  7. Dgold
    Member
    Posted 8 years ago #

    backticks not single-quote marks, backtick at the top left of my keyboard Try It

  8. FranceFan
    Member
    Posted 8 years ago #

    Well, I can't seem to cut and paste all the code, half of it is being deleted every time I try. I wish I could edit/delete the above posts. Really embarassing. I'll try one more time, if that doesn't work perhaps someone can tell me how to paste some code into this post.

    "<img src='http://france-property-and-information.com/french-property-blog/wp-content/images/thumb-FrenchPropertyStables1.jpg' alt='Stable Floor-1' />"

  9. FranceFan
    Member
    Posted 8 years ago #

    Good tip. Here I try again:

    <a href="'http://france-property-and-information.com/french-property-blog/wp-content/images/FrenchPropertyStables1.jpg"><img src='http://france-property-and-information.com/french-property-blog/wp-content/images/thumb-FrenchPropertyStables1.jpg' alt='Stable Floor-1' /></a>

  10. FranceFan
    Member
    Posted 8 years ago #

    Well, I could now post the code. However, just seen my problem (one quote too many). The earlier code suggestion works great.

    Only thing, instead of opening up a window or expanding the picture, it replaces the current page by a page just showing the picture. To get back to the original thread, the user has to click back on their browser. Is there a way to resolve this?

  11. Beel
    Member
    Posted 8 years ago #

    Hold the shift key and click the link or use javascript

  12. FranceFan
    Member
    Posted 8 years ago #

    If I tried to do this through javascript, what would the javascript be?

  13. Beel
    Member
    Posted 8 years ago #

    I don't remember the thread I posted the code in, but there are several threads which link to it. Give the "Search First" a shot. You can also google for it as lots of sites explain how to do it.

Topic Closed

This topic has been closed to new replies.

About this Topic