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

Support resource metadata #46

Closed
nicokaiser opened this issue Feb 14, 2024 · 4 comments
Closed

Support resource metadata #46

nicokaiser opened this issue Feb 14, 2024 · 4 comments

Comments

@nicokaiser
Copy link
Owner

nicokaiser commented Feb 14, 2024

Metadata can be set in front matter:

resources:
  - src: img_0001.jpg
    title: A nice view in the mountains
    params:
      cover: true

In addition to EXIF, support fetching metadata from there.

@nicokaiser
Copy link
Owner Author

Also the cover image could be retrieved from there:

{{ $cover := index (where $images "Params.cover" "eq" true) 0 | default (index $images 0) }}

@nicokaiser
Copy link
Owner Author

Currently (as of v3.1.0) only the Title can be set through resource metadata, which is fine for now.

@HuggeK
Copy link

HuggeK commented Jun 19, 2024

Is there any option to include the metadata in the scaled down images which is shown on the page for indexing purposes of Google? Google search console would want the licensing information which can be included in the metadata of the file.

@nicokaiser
Copy link
Owner Author

I do not think this is currently possible with Hugo, since all metadata is removed when resizing images. That’s why at least some data is copied to the meta tags in gallery.html. I wonder if the original image can be referenced from there (or is it already?), so Google will pick up only the originals – but since those are not used at all on the websites (apart from the Download feature), I am not sure if this can be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants