<p><spanclass="h-card"translate="no"><ahref="https://s.gigantos.net/@gigantos"class="u-url mention">@<span>gigantos</span></a></span> Browsing around I found this cool open source application for creating nice looking code images</p><p>Carbon: <ahref="https://carbon.now.sh/"target="_blank"rel="nofollow noopener noreferrer"translate="no"><spanclass="invisible">https://</span><spanclass="">carbon.now.sh/</span><spanclass="invisible"></span></a></p><p>This can output both as PNG and SVG, though sadly it doesn't look like Mastodon supports SVGs. As you mentioned before, the best bet is likely to have the code in the alt image.</p>