'Insert an image and preserve the default order of members

I want to have images after certain methods in Sphinx, what I have:

Foo
============

.. autoclass:: Bar.foo
    :exclude-members: baz

    .. automethod:: baz
    .. image:: ./images/baz_graph.png

The problem is that the order of methods gets mixed up and method baz is now the first one to appear even before __init__ (default order is bysource).

What I want is to insert an image after a method and have that method and the image to go in the bysource order.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source