WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] hyperlinks to .jpg files not opening (6 posts)

  1. juliakostreva
    Member
    Posted 7 months ago #

    On my wordpress Pages, any hyperlink text whose URLs point to .jpg files won't work. The text appears as a link, it has a hover state on mouseover, and you can copy the link URL to your clipboard. But when you click on the hyperlink text, it doesn't open/it doesn't go anywhere.
    <a href="http://blog.juliakostreva.com/wp-content/uploads/2014/01/Julia-Kostreva-marble-wallpaper-1280x800.jpg" target="_self">1280×800</a>

    On the other hand, if the hyperlink text whose URL points to a page/an html file, the link will open.

    Any ideas why I can't link to a .jpg file?
    Please see: http://blog.juliakostreva.com/desktops/

  2. webbrewers
    Member
    Posted 7 months ago #

    If you add a link to a .jpg without the fancy box class does it work?

  3. juliakostreva
    Member
    Posted 7 months ago #

    Sorry, let me be clear:

    I need a text hyperlink to point to a .jpg file, for example:
    <a href="http://blog.juliakostreva.com/wp-content/uploads/2014/01/Julia-Kostreva-marble-wallpaper-1280x800.jpg" target="_self">1280×800</a>
    Doesn't do anything when you click the text hyperlink.

    But, if I update the URL to point to a website or a folder or an .html file, for example
    <a href="http://blog.juliakostreva.com" target="_self">1280×800</a>
    Clicking the text hyperlink works.

    Any idea why I can't point to a .jpg file?

    There is no class attribute specified.
    I've tried changing target="_self" to target="_blank" - and that also does not work.
    I've tried adding the html5 download attribute to force the .jpg file to download to the harddrive - and that also does not work. e.g.
    <a href="http://blog.juliakostreva.com/wp-content/uploads/2014/01/Julia-Kostreva-marble-wallpaper-1280x800.jpg" target="_self" download="desktop.jpg">1280×800</a>

    Please see: http://blog.juliakostreva.com/desktops/

  4. Andrew
    Forum Moderator
    Posted 7 months ago #

    Try deactivating your Fancybox plugin

  5. webbrewers
    Member
    Posted 7 months ago #

    There is no class attribute specified.

    Yes, there is. The class getting added is for fancybox, so either do as Andrew suggested or as I did - add an image without using fancybox.

  6. juliakostreva
    Member
    Posted 7 months ago #

    ah, I gotcha! I de-activated the plug-in - yes, that was force adding the class attribute. That worked! Thanks so much!!

Reply

You must log in to post.

About this Topic