-
Notifications
You must be signed in to change notification settings - Fork 207
ENH: Add thumbnail size setter #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thumbnails are of fixed size and rather big(compared to the gallery thumbnail size) as on scikit-learn they were used on other places in their docs(the carousel for example). I'm not sure about adding this extra setter. But if we go for it, I might say start clustering it with other options for the thumbnail, like the default image. Something like 'gallery_thumbnails':{'default': 'no_image.png', 'size': (200, 140),'broken':'broken_example.png'} Of course that would break backwards compatibility. As we have the default image as a separate key. But in this way we could expose those defaults to the config rather than setting them up inside the codebase. Then this default will also be more discoverable and help with #276 |
It sounds like @Titan-C is suggesting that using CSS to resize images would be a decent solution, is that right? |
We already resize with CSS. My guess is @Eric89GXL wants to set a new smaller size on the Thumbnail, so save on space as the thumbnail images is larger than the saved size. Otherwise, if it is on the aesthetics of the thumbnail, yes changing CSS at will is the easiest and can be done on the user side. |
I actually just want larger images in the gallery section. If this can
already be done with CSS, then I'll just make a documentation PR update.
|
were you able to figure this out w/ CSS? (and if so can we close this?) |
Will auto-close on merge
|
CSS isn't sufficient, I have opened a different bug report about that (#282). Closing this one to move discussion there. |
It looks like the thumbnail dimensions are static:
https://github.com/sphinx-gallery/sphinx-gallery/blob/master/sphinx_gallery/gen_rst.py#L357
I'm happy to add it as a
conf.py
key (thumbnail_size
tuple?) if people agree it would be useful.The text was updated successfully, but these errors were encountered: