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

Using "with" in conjunction with .Exif produces runtime error for PNG images #7688

Closed
jmooring opened this issue Sep 14, 2020 · 5 comments · Fixed by #7693
Closed

Using "with" in conjunction with .Exif produces runtime error for PNG images #7688

jmooring opened this issue Sep 14, 2020 · 5 comments · Fixed by #7693
Assignees
Milestone

Comments

@jmooring
Copy link
Member

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.76.0-DEV/extended linux/amd64 BuildDate: unknow

Does this issue reproduce with the latest release?

Yes.

Background

The documentation and this forum topic suggest using with to avoid errors when attempting to read EXIF data while ranging through a directory of images that contains one or more PNG files. Hugo's ability to read EXIF data is limited to the JPEG and TIFF formats.

Problem

Using this approach results in "error calling Exif: runtime error: invalid memory address or nil pointer dereference."

To reproduce the problem:

I will post a minimal failing example shortly.

@bep
Copy link
Member

bep commented Sep 14, 2020

See my comment in the forum.

@jmooring
Copy link
Member Author

jmooring commented Sep 14, 2020

The nested with does not seem to be working either. Minimal failing example:

git clone --single-branch -b hugo-github-issue-7688 https://github.com/jmooring/hugo-testing hugo-github-issue-7688
cd hugo-github-issue-7688
hugo server

See layouts/shortcodes/list-image-descriptions.html

@jmooring
Copy link
Member Author

Pushed minimal failing example again to fix comment syntax.

@bep
Copy link
Member

bep commented Sep 14, 2020

OK, a PNG image, yes then I think I understand.

@bep bep added the Bug label Sep 14, 2020
@bep bep self-assigned this Sep 14, 2020
@bep bep added this to the v0.75.1 milestone Sep 14, 2020
bep added a commit to bep/hugo that referenced this issue Sep 14, 2020
bep added a commit to bep/hugo that referenced this issue Sep 14, 2020
@bep bep closed this as completed in #7693 Sep 15, 2020
bep added a commit that referenced this issue Sep 15, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants