This extension allows setting the scaling factor of images and figures depending on the builder.
Just install via pip:
$ pip install sphinxcontrib-scalebybuilderThen add the module sphinxcontrib.scalebybuilder to the
extensions list in your conf.py.
Scale images or figures differently depending on the builder by suffixing the
scale option with -<builder>:
.. image:: img.png
:scale-html: 75%
:scale-latex: 50%
.. figure:: fig.png
:scale-html: 150%
:scale-latex: 25%
A figure scaled to 150 % in HTML and 25 % in LaTeX.