Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to jpg image file not working properly #3472

Closed
rzbrk opened this issue Nov 3, 2020 · 1 comment
Closed

Link to jpg image file not working properly #3472

rzbrk opened this issue Nov 3, 2020 · 1 comment

Comments

@rzbrk
Copy link

rzbrk commented Nov 3, 2020

Environment

Python Version: Python 3.7.3

Nikola Version: Nikola v8.1.1

Operating System: Linux xxxxxxx 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux

Web Browser: Brave Browser 86.1.16.68

Description:

When inserting a link to an image in a reST source file, e.g.

`Link to image </image/image.jpg>`_

the link in the output html file is not working properly, meaning by clicking on the link in a web browser, the image is not displayed as expected. Actually, when clicking the link, nothing happens. The image can be opened by right-clicking on the link and selecting "open in new tab", hence the link to the jpg file is correct.

The link created in the html output file is of type reference external:

<a class="reference external" href="../../images/image.jpg">Link to image</a>
@rzbrk rzbrk added the bug label Nov 3, 2020
@Kwpolska Kwpolska added this to the v8.1.2 milestone Nov 6, 2020
Kwpolska added a commit that referenced this issue Nov 11, 2020
Fix clicking on links to image files. baguetteBox now requires a
link (``<a>``) to have an ``<img>`` as a child in order to make the
link activate the lightbox.
@Kwpolska
Copy link
Member

I created PR #3474 with a fix, please test.

Kwpolska added a commit that referenced this issue Nov 13, 2020
Fix #3472 (links to images broken); limit baguetteBox to <a> with <img>
devilgate pushed a commit to devilgate/nikola that referenced this issue Nov 15, 2020
Fix clicking on links to image files. baguetteBox now requires a
link (``<a>``) to have an ``<img>`` as a child in order to make the
link activate the lightbox.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants