Not sure if this helps, but the example that I came up with for the quickstart https://orgmode.org/quickstart.html#macros has an example (see below) of using multiple @@ export snippets in a single macro. If you have consistent naming conventions for pdf vs svg you might be able to write a variant #+macro: image that works like {{{image(file-name-without-extension)}}}. Not sure this will get you what you want though since I imagine that you want to modify how links such as [[file:file-name.ext]] are exported. One alternative would be to define a custom link type https://orgmode.org/manual/Adding-Hyperlink-Types.html that would do the type setting for you. If you want those definitions to live in the org file you could use Eric's eval: (org-sbe startup) local variable approach to ensure that the elisp definitions are always available. Best, Tom
The example from the quickstart: #+MACRO: red @@html:<span class="red">$1</span>@@@@latex:\textcolor{red}{$1}@@