If I place the #+CAPTION: and #+HTML_ATTR before the #+RESULTS:, then generate again the result of the source block, I got a new #+RESULTS: on top of the previous and its caption and html attributes.
Example, before regenerate the source block result: #+CAPTION: Test image #+HTML_ATTR: :width 30px #+RESULTS: [[file:images/simple-test.png]] And after regenerate the source block result: #+RESULTS: [[file:images/simple-test.png]] #+CAPTION: Test image #+HTML_ATTR: :width 30px #+RESULTS: [[file:images/simple-test.png]] My version of Org-mode is 9.6.15 Ihor Radchenko <yanta...@posteo.net> writes: > Sébastien Gendre <s...@k-7.ch> writes: > >> When a source block create a result who is an image, how can I define >> the #+CAPTION, #+LATEX_ATTR and #+HTML_ATTR of this image ? >> >> If I add them manually after the result generation, and generate again >> the result, the #+CAPTION, #+LATEX_ATTR and #+HTML_ATTR are moved after >> the result. > > I am unable to reproduce. The updated result does not displace the > affiliated keywords on my side, using the latest main and the latest > stable Org mode version.