Björn Bidar <bjorn.bi...@thaodan.de> writes: >> IMHO, it would be best to pass image file name/raw image data to >> `org-link-preview-image-data', not an image object and call >> `org--create-inline-image' from inside `org-link-preview-image-data'. >> That way, we can automatically obey Org customization wrt image >> alignment, image width, and image max width. > > For that case using org-link-preview-file should be sufficient?
Sorry, I am lost. AFAIU, your original motivation was: >> 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. Did it change? -- 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>