When org-mode html export parses an .org file and encounters a link to an image, as for example [[file:/Users/user/nice_image.png]]
, it properly converts the link into an html figure.
I'd like to extend that behaviour to other image formats that aren't currently supported by org's publishing facilities.
To be more specific, if my .org file contains a link to medical images in, e.g., DICOM format, I'd like org-mode to
- recognise that the link is pointing to a DICOM,
- run a shell command that creates a PNG file from the DICOM,
- export an html figure as if the link would've been pointing to the PNG file all along.
Does anyone know how to do that?