Skip to content
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

=WxH syntax for specifying image size is not working in some places #671

Closed
damithc opened this issue Feb 6, 2019 · 3 comments · Fixed by #1838
Closed

=WxH syntax for specifying image size is not working in some places #671

damithc opened this issue Feb 6, 2019 · 3 comments · Fixed by #1838

Comments

@damithc
Copy link
Contributor

damithc commented Feb 6, 2019

v1.17.2

Problem:
Consider ![](https://foo.io/logo.png =25x100). This way of specifying the image size works in some places (e.g., in a slot="header" fragment of a panel) but not in other places (e.g., normal body text)

This works!
image

@jovyntls
Copy link
Contributor

jovyntls commented Mar 17, 2022

It seems that the =WxH syntax is currently broken in panel headers too. In our UG Panels section:
image

(The "MarkBind" logo should be smaller, but it's rendered with its original size)

Tested with two different values for the =WxH syntax, both rendered the same size:

<panel header="**Bold text** :rocket: ![](https://vuejs.org/images/logo.png =10x10)" type="seamless">
  ...
</panel>
<panel header="**Bold text** :rocket: ![](https://vuejs.org/images/logo.png =20x20)" type="seamless">
  ...
</panel>

image

@jonahtanjz
Copy link
Contributor

Could be an issue with the extension markdown-it-imsize. Last release was 7 years ago so some changes in markdown-it could have caused it to stop working.

@jovyntls
Copy link
Contributor

jovyntls commented Mar 17, 2022

The plugin markdown-it-linkify-images seems to be overriding markdown-it-imsize.

markdown-it-linkify-images only takes the src attribute so the width/height attributes (set by markdown-it-imsize) are removed.

EDIT: this seems to be fixed in v2.0 of the plugin - maybe we can update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants