Closed HuangJunye closed 1 year ago
The mechanism for overriding the default image stayed the same, but I have indeed changed the file name including the suffix. So if you want to override the default, you now need to provide an SVG image at _static/nbsphinx-no-thumbnail.svg
.
Alternatively, or if you want to use a different image format than SVG, you can use this in your conf.py
:
nbsphinx_thumbnails = {
'**': 'path/to/my-file.png',
}
See https://nbsphinx.readthedocs.io/en/0.9.1/gallery/thumbnail-from-conf-py.html.
The mechanism for overriding the default image stayed the same, but I have indeed changed the file name including the suffix. So if you want to override the default, you now need to provide an SVG image at
_static/nbsphinx-no-thumbnail.svg
.Alternatively, or if you want to use a different image format than SVG, you can use this in your
conf.py
:nbsphinx_thumbnails = { '**': 'path/to/my-file.png', }
See https://nbsphinx.readthedocs.io/en/0.9.1/gallery/thumbnail-from-conf-py.html.
Thanks for the response! I am going to try that.
I am going with the conf.py
approach because I want to use png file. It's working well. Thanks for the tips! https://github.com/Qiskit/qiskit/pull/1708
Previously, it was possible to set a default fall back thumbnail by putting a
no-image.png
inside_static
folder like here. However, this behaviour has changed since release 0.9. Is there a way to specify the fall back thumbnail that is not the standard "nbsphinx-no-thumbnail.svg" image?Related to https://github.com/Qiskit/qiskit/issues/1707