Skip to content

Conversation

ruaridhg
Copy link
Contributor

@ruaridhg ruaridhg commented Sep 4, 2025

Checked with exiftool -PNG:Alt <image_name.png>

@ruaridhg ruaridhg linked an issue Sep 4, 2025 that may be closed by this pull request
@ruaridhg ruaridhg marked this pull request as ready for review September 5, 2025 14:02
@ruaridhg ruaridhg requested a review from dstansby September 5, 2025 14:02
@dstansby
Copy link
Contributor

Nice! If alt-text is added to the .png metadata file this way, and the .png file is added to a web page (ie, https://heftieproject.github.io/zarr-benchmarks/), does web browser "know" this is where to find the alt-text, and display it when moused over (or say it when a screen reader is being used)? I assumed that we might have to manually add the alt-text to the markdown file, but if we can semi-automate it like this that would be a bit easier.

@dstansby
Copy link
Contributor

Following on from our meeting, out of interest where did you get inspiration for this implementation from? I'm intrigued if adding alt-text to .png files in this way is some sort of standard.

@ruaridhg
Copy link
Contributor Author

Following on from our meeting, out of interest where did you get inspiration for this implementation from? I'm intrigued if adding alt-text to .png files in this way is some sort of standard.

https://stackoverflow.com/questions/58399070/how-do-i-save-custom-information-to-a-png-image-file-in-python
It may just be if you're using Pillow so probably not standard. I added alt-text to the main PR #79 instead of using this method.

@dstansby
Copy link
Contributor

Should we close this in favour of your changes in the other PR then?

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.

Add alt text to images in write up
2 participants