d2
d2 copied to clipboard
imgbundler: Make more clear when images did not bundle successfully
See https://github.com/terrastruct/d2/pull/278#issuecomment-1331991147
We ought to replace failed images with a placeholder and include the error in partial renders.
Perhaps we should also prevent watch.js from adding the error to the surrounding HTML and just rely on the returned svg including the error.
I've got some old code lying around in the monorepo at commit 538f5b995ffcaefd245ef8c8509cd55c4049c088 that will be very helpful.
test: {
icon: https://no.com
}
test2: {
icon: https://no.com
}
works: {
icon: https://www.howtogeek.com/wp-content/uploads/2018/06/shutterstock_1006988770.png
}
test -> test2
produces image without the default placeholder for some reason