Support » Fixing WordPress » hyperlinks to .jpg files not opening

  • Resolved juliakostreva


    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="" 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:

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you add a link to a .jpg without the fancy box class does it work?

    Sorry, let me be clear:

    I need a text hyperlink to point to a .jpg file, for example:
    <a href="" 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="" 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="" target="_self" download="desktop.jpg">1280×800</a>

    Please see:

    Moderator Andrew Nevins


    Forum moderator

    Try deactivating your Fancybox plugin

    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.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘hyperlinks to .jpg files not opening’ is closed to new replies.