Using sphinx doc generator, I am trying to use .png images for the HTML builds of the documentation, and then I want to have the .svg images used for the PDF/LATEx builds.>
Take a look at these options:
Image filename wildcard:
.. image:: gnu.*
From the documentation: "For instance, if the file name gnu.* was given and two files gnu.pdf and gnu.png existed in the source tree, the LaTeX builder would choose the former, while the HTML builder would prefer the latter."
The only directive:
.. only:: latex
This appears only in LaTeX output.
.. only:: html
This appears only in HTML output.