-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Image height is ignored in RST #295
Comments
Image sizes are currently sanitized out. I would love to figure out a solution to the retina issue, per your example. Besides retina images, I haven't seen many compelling use cases for general image sizing. |
This is a clear bug and it has nothign to do with the retina. Here is a simple use case for using images of different resolution: you have credits or sponsors for your project and you want do display them. Their logos are of different sizes and you want to make them of similar size. Obviously you do not want to include their logos with your source code due to copyright infringement. Here is an example of ugly results due to dropping the size elements from the images: https://github.com/pycontribs/jira |
…ps width parameter of ..image (see github/markup#295)
Guys, any reason why you "sanitize" the size? I don't really see any good reason for doing this operation, is only making the experience much worse. |
Scaling status images for different services like Travis is another common use case. They are often of different sizes. |
Seriously? This is mental. It works when for Markdown, but for Python projects it's better to have reStructuredText for the README to avoid having to maintain two README files for GitHub and PyPI. Please reconsider this issue. |
This bug as many others are good reasons why people are switching to alternatives, like GitLab. They are open source, more open to suggestions and accepting contributions from the community. |
In my case, I'm now shipping a logo in my sources which is really not open source and I'm going to have to remove it again when I do Debian packaging to make sure the package is DFSG compliant. "Sanitising" the heights is really just creating extra work for people. I can see no use case where "sanitising" is useful and no explanation has been given here of why this is the case. I understand GitHub wants to be the definition of open source, and this is good for the GitHub business model, but sometimes it's good to also remember that it exists within an ecosystem and creating extra work for people is a good way to annoy that ecosystem. |
Github sanitizes out image size option github/markup#295
Since GitHub reStructuredText doesn't respect image sizing parameters (see github/markup#295) leverage this on-the-fly resizing service that someone sniffed out from Google. (see https://gist.github.com/carlo/5379498) Only downside is that I don't think it's officially supported, so might go away at any time, but it's better than giant logos!
Since GitHub reStructuredText doesn't respect image sizing parameters (see github/markup#295) leverage this on-the-fly resizing service that someone sniffed out from Google. (see https://gist.github.com/carlo/5379498) Only downside is that I don't think it's officially supported, so might go away at any time, but it's better than giant logos!
Since GitHub reStructuredText doesn't respect image sizing parameters (see github/markup#295) leverage this on-the-fly resizing service that someone sniffed out from Google. (see https://gist.github.com/carlo/5379498) Only downside is that I don't think it's officially supported, so might go away at any time, but it's better than giant logos!
+1 for this |
Would love it if |
* Several updates and fixes. * add image * options for image * absolute path for image URI * Reduce image size, add height/width to RST * Fix dimensions * Move image info to bottom * move back image to top * Make image smaller since width attribute is sanitized. Works around github/markup#295
@bkeepers please reopen the issue. |
I have just come across this bug too. Please reopen. |
+1 |
1 similar comment
+1 |
Hi all, I've found a workaround using reStructuredText's
|
@jondelmil downside to this approach is pypi. If you end up uploading your project to pypi it will treat your README.rst as plain text and not render it properly. |
~4 years later this is still broken on GitHub... |
Github's RST rendering is currently broken [1]: does not support image sizing or multiple images per line. PyPI now supports markdown, so we can switch to harmonize with TileDB core repo. [1] github/markup#295
Github's RST rendering is currently broken [1]: does not support image sizing or multiple images per line. PyPI now supports markdown, so we can switch to harmonize with TileDB core repo. [1] github/markup#295
Github's RST rendering is currently broken [1]: does not support image sizing or multiple images per line. PyPI now supports markdown, so we can switch to harmonize with TileDB core repo. [1] github/markup#295
Github's RST rendering is currently broken [1]: does not support image sizing or multiple images per line. PyPI now supports markdown, so we can switch to harmonize with TileDB core repo. [1] github/markup#295
* Remove use of raw directive in README.rst as not allowed on PyPI - Amends PR #819 * Resize image files for Brazil Band plots in README to be 500 px wide - c.f. github/markup#295 * Add twine check of dist to publishing CI tests * Add smaller version of pyhf logo for documentation
Having this closed/wontfix makes rST a 2nd-class citizen on GitHub. Transitively, that gives the same impression for projects which prefer rST, like Python. |
Also removed matchms header, as the logo IS the header. Because image height is ignored by github while rendering rst (github/markup#295 from 2014), I'm using raw html to get the logo the size that I want.
Please reopen this. |
Github's RST rendering is currently broken [1]: does not support image sizing or multiple images per line. PyPI now supports markdown, so we can switch to harmonize with TileDB core repo. [1] github/markup#295
Turn big rocket to small rocket when rendered in GitHub. We use raw HTML image element because GitHub has no plans to support RST image widths (github/markup#295), and in that element we use a remote link instead of a relative one because it seems Sphinx does not handle relative links very well outside of proper RST images.
inspired by github/markup#295 (comment) --- Signed-off-by: Brad Chamberlain <[email protected]>
for logo issue, see github/markup#295
GitHub sanitizes the size of figures in their RST renderer (see github/markup#295), so we need to remove the logo (the workaround suggested in that issue of using the RST `raw` directive doesn't work because PyPI rejects the `raw` directive).
Just a heads up: |
Thanks you, GitHub: github/markup#295
Thanks you, GitHub: github/markup#295
Is this working for other folks? It doesn't seem to work still. Does it matter that I am specifying percents for width? |
The
height
option is ignored in RST image directives. For example:is converted to the following HTML:
(note missing height), while
rst2html
gives the following output:The text was updated successfully, but these errors were encountered: