Why syntax is invalid? I've taken a look at the source code in org-elements.el and found that it is taking into account some expressions, like #+results: and so on(see org-element-affiliated-keywords, org-element--affiliated-re) when attaching properties to objects.
And everything works fine (attributes were attached to right objects), except org-babel strategy for searching #+results: expression for updating results. What could you suggest in my case? When I put attributes right before link to the image file, I get: initial code: ,---- | #+begin_src ditaa :file 123.png :cache yes | ... | #+end_src | | #+results[f8f8...]: | #+attr_html: alt="big image" width="100%" | file:123.png `---- C-c C-c, result: ,---- | #+begin_src ditaa :file 123.png :cache yes | ... | #+end_src | | #+results[f8f8...]: | file:123.png | | #+attr_html: alt="big image" width="100%" | file:123.png `---- With best regards, Vasil