Skip to content

Image captions#74

Merged
waynezhang merged 3 commits intowaynezhang:mainfrom
carpetscheme:captions
May 25, 2025
Merged

Image captions#74
waynezhang merged 3 commits intowaynezhang:mainfrom
carpetscheme:captions

Conversation

@carpetscheme
Copy link
Copy Markdown
Contributor

Hello!

I wanted to enable showing captions for the photos, for a particular project. If you prefer not to add more complication then feel free to close the PR, I will happily keep a fork, but thought it may be of interest.

The change reads the EXIF 'Image Description' tag and adds it as an image alt tag. The photoswipe dynamic caption plugin is used to read this tag and show a caption.

Thanks for the tool in any case! Regards

@waynezhang
Copy link
Copy Markdown
Owner

@carpetscheme thanks so much! I'm definitely interested in this idea. I was also considering to add exif information. I'll probably refactor this into the approach that passing a format of string for alt text like "%ImageDescription% - %Artist%".

@waynezhang
Copy link
Copy Markdown
Owner

@carpetscheme I made some refactoring on your PR.

  • Removed AltText
  • Pass all EXIF data to template to delegate the presenting logic

@carpetscheme
Copy link
Copy Markdown
Contributor Author

carpetscheme commented May 25, 2025

Great idea! Much cleaner, nicely done. Thanks again

@waynezhang waynezhang merged commit aa307cd into waynezhang:main May 25, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants