Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add width tags for jpeg and png when present #588
The display(Image(..., retina=True)) command creates metadata about the image explaining the size that it should be displayed at in the notebook. This information, if present, can be carried into the notebook and converted to rst for use in documenters such as Sphinx. If not present, retina images appear in .rst (and from there to other formats such as HTML) as twice their intended size.
referenced this pull request
May 16, 2017
It looks like we have a
I'd slightly prefer it if we could test that this is adhered to so that this doesn't happen in the future.
An aside: there's no way to update the image metadata in
Thanks for "teaching me to fish" -- I've made these changes and added a test equivalent to the metadata test in test_html. I now feel like I understand the rst remplate system better so may be able to make some further improvements in the future. THANKS! @mpacer
Happy to help — thank you for contributing!
It's good as it stands, but if you want I'm confident that by tweaking the test to be closer to testing the behaviour you actually care about it can be even better. Happy to help with that too.
But that's your call — if you want to call it "done" it's ready to be merged.