gerard.vermeu...@posteo.net writes: >> This is awkward. To do per-image export adjustments, we usually use >> export attributes (#+ATTR_HTML: ...). And why "split"? > > I do not think that #+ATTR_HTML allows to embed (= copy) the contents > of an SVG file directly into the HTML page. As far as I understand, it > adds > only attributes to HTML elements.
For now, yes. But more generally, Org uses #+ATTR_BACKEND to configure export. For example, see "13.10.6 Images in LaTeX export". You may arrange ox-html to handle special #+ATTR_BACKEND: :org-embed t attribute that will be ignored in `org-html--make-attribute-string' and checked in your `org-html--embed-svg-p'. > The "split" is because of similarity with :select_tags and :exclude_tags > in ox. > It allows several files to be included in or excluded from embedding. Makes sense. >> Please use `org-export-inline-image-p'. > > I think that the terminology "inline-image" in ox-html is confusing. > In ox-html the result of the "inline-image" code is an HTML tag like > > <img with attributes inside> > > It does not mean that image data is copied inline as with embedding. If image is not inlined, it must not be displayed as an image, just as a link. Your code will break this convention. Please refer to "13.9.9 Images in HTML export" section of Org manual. >> But the original code is different, no? > > Yes, I pretend that my code is an improvement: > 1. The with-syntax-table is superfluous. > 2. The error message gives a reason and the filename causing it. Then, I find your code sufficiently different to not link to stackoverflow. This link is not helpful to understand the code. -- Ihor Radchenko // yantar92, Org mode contributor, 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>