-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
When there's a syntax error and the Accept request HTTP header is "image/*" we should return an image #842
Comments
I wonder if it should be optional. Arguably, this is only really useful when editing diagrams and we probably don't want to show an error on a live site...? 🤔 So maybe it should be disabled by default and enabled using a query parameter, such as Otherwise, we could decide that this is not our responsibility. Users could use the following approach to hide the image when something is wrong: <img src="https://kroki.io/plantuml/svg/eNpLstFVTAQABAkBTg==" onerror="this.style.display='none'"/> Or even display a placeholder image: <img src="https://kroki.io/plantuml/svg/eNpLstFVTAQABAkBTg==" onerror="this.src='fallback-img.jpg'"/> |
Use svgSalamander to create SVG and PNG images. Batik adds ~7mb of dependencies.
Use svgSalamander to create SVG and PNG images. Batik adds ~7mb of dependencies.
Use svgSalamander to create SVG and PNG images. Batik adds ~7mb of dependencies.
Use svgSalamander to create SVG and PNG images. Batik adds ~7mb of dependencies.
Use svgSalamander to create SVG and PNG images. Batik adds ~7mb of dependencies.
Otherwise, Kroki does not return an error image when the Accept header contains more than one MIME-type. Reference yuzutech#842
Currently, Kroki will return the error message as plain text.
As a result, we get a broken image icon when using an
<img>
element:Chrome
Firefox
Instead, it would be useful to show the error message as an image:
The text was updated successfully, but these errors were encountered: