# Org export: Specifying common image properties for html and latex

Suppose I want to have the same image attributes for HTML and LATEX export I have to specify them twice as in the following example:

``````#+CAPTION: Example image
#+ATTR_HTML: :align center :width 100px
#+ATTR_LATEX: :align center :width 100px
[[file:image.png]]
``````

Is there also a way to specify the attributes just once such that it applies automatically to both HTML and LATEX export.

• My first idea is a macro definition such as: `#+MACRO: newline src_emacs-lisp[:results raw]{"\n"} #+MACRO: mywidth #+ATTR_LATEX: :align center :width 100p {{{newline}}}#+ATTR_HTML: :align center :width 100p`, but which produces something like this on export: `\includegraphics[width=100p {{{newline}}}#+ATTR_HTML:]{image.png}` – Singulaere Entitaet Aug 27 '17 at 21:18