Björn Bidar <bjorn.bi...@thaodan.de> writes: > Would it be possible to also handle image data in the function or > refactor the org-link-preview-file function in a way that the geometry > handling is done in a helper function which can be reused by other > handlers.
There is such function: `org-display-inline-image--width'. We may consider exposing it as public function. > The link element passed towards the handler didn't contain the > description e.g. in this case > file:https://stable.melpa.org/packages/rpm-spec-mode-badge.svg. This is expected. See https://orgmode.org/worg/dev/org-element-api.html#org22c967a You can access the contents by looking at buffer text between :contents-begin and :contents-end. Either directly, or by invoking sub-parser on the text. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>