How to resize images in org-mode describes to resize images using #:ATTR_HTML. This has not worked for GitHub's org-mode export, though: adding
#:ATTR_HTML: :width 100px
works in emacs' export, but GitHub seems to omit it.
Is there any way to make GitHub resize an org-exported image?
As part of its rendering pipeline, after converting Org to HTML,
The HTML is sanitized, aggressively removing things that could harm you and your kin—such as
scripttags, inline-styles, andclassoridattributes.
The sanitation rules used to be referenced here as well, but this reference was removed in October, 2018. As a result it is no longer clear which tags and attributes are permitted, but it is very likely that the generated width="100px" attribute is removed during this process.
It is also possible that the Ruby library GitHub users to convert Org to HTML simply doesn't support ATTR_HTML.
In either case, your best bet is probably to use a real 100px-wide version of that image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With