question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Image resize in % doesn't work anymore

See original GitHub issue

Bug Report

We’re following the docsify documentation, which states that it’s possible to resize an image using a percentage: https://github.com/docsifyjs/docsify/blob/develop/docs/helpers.md#resizing

Steps to reproduce

Use markdown to insert an image, with 50% width:

![My diagram](/_media/diagrams/sample_upstream_flow.png ':size=50%')

What is current behaviour

Notice the width is wrong. Instead of 50% it’s just 50. Also the % seems to somehow be transferred to the title attribute:

<img src="/upstream-protocol/sample-app/_media/diagrams/sample_upstream_flow.png" 
  alt="My diagram" 
  title="%" 
  width="50" 
  height="50">

What is the expected behaviour

<img src="/upstream-protocol/sample-app/_media/diagrams/sample_upstream_flow.png" 
  alt="My diagram"
  width="50%">

Other relevant information

Screenshot 2020-04-13 16 18 11

Could this be a parsing mardown issue? Perhaps here: https://github.com/docsifyjs/docsify/blob/master/src/core/render/utils.js#L6-L14 ?

  • Bug does still occur when all/other plugins are disabled?

  • Your OS:

  • Node.js version:

  • npm/yarn version:

  • Browser version:

  • Docsify version: 4.11.3

  • Docsify plugins:

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
costimurarucommented, Apr 14, 2020

Thanks for the quick fix here, @Koooooo-7. And @anikethsaha for reviewing. You guys rock!

2reactions
Koooooo-7commented, Apr 13, 2020

@Koooooo-7 thanks a lot for investigating this ( as always )

Can you submit a PR with the fix and also we need to check if it’s breaking something else or not,

yea, I m working on it. 🔨

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image resizer doesnt work anymore for some reason #17673
when i select images and click resize, there is no popup and it just resizes. i know its rather pedantic but it would...
Read more >
why can't I resize my photos in Windows - Microsoft Community
Open the photo in Microsoft Paint Select Home tab Click Resize within the Image group Select Pixels Enter the appropriate dimensions then ...
Read more >
Image resizing is not working on New Sites. Is this a new glitch ...
Image resizing is not working on New Sites. Is this a new glitch or a permanent change? Tried to resize a picture and...
Read more >
PIL Image.resize() not resizing the picture - Stack Overflow
resize () returns a resized copy of an image. It doesn't modify the original. The correct way to use it is: from PIL...
Read more >
How to Fix Resize Image Not Working in Photoshop - YouTube
Subscribe for more videos like this! :)In this video, I will show you how to fix resizing images not working in photoshop.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found