Enable sphinx numfig
Enable numfig and use numref
to properly refer to diagrams etc. See http://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-numref.
@ximinity knows most about this, so I suggest he handles this issue.
Edited by Melvin Vermeeren