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

Generate alt text from filename for data-uri images #1114

Open
rxt1077 opened this issue Jan 22, 2024 · 0 comments · May be fixed by #1115
Open

Generate alt text from filename for data-uri images #1114

rxt1077 opened this issue Jan 22, 2024 · 0 comments · May be fixed by #1115

Comments

@rxt1077
Copy link
Contributor

rxt1077 commented Jan 22, 2024

When the data-uri attribute is set and the alt text is not specified for images, renderImageAlt (pkg/renderer/sgml/image.go) gives an alt text of "." from the src URL. For example:

= data-uri without alt
:data-uri:

image::test/images/favicon-glasses-16x16.png[]

Yields a document with the img tag: <img src="data:image/jpg;base64,/9j..." alt=".">

rxt1077 added a commit to rxt1077/libasciidoc that referenced this issue Jan 22, 2024
Use file name when alt text not specified for data-uri images.
Now uses image location instead of src attribute.

Closes bytesparadise#1114
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 a pull request may close this issue.

1 participant