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

Allow resizing of images #696

Closed
fzeiser opened this issue Nov 24, 2020 · 2 comments · Fixed by #738
Closed

Allow resizing of images #696

fzeiser opened this issue Nov 24, 2020 · 2 comments · Fixed by #738
Labels
feature request 🌟 Issue is a new feature request.

Comments

@fzeiser
Copy link

fzeiser commented Nov 24, 2020

Feature request: Possibility to resize images for rendering

In the legacy version it was (easily) possible to resize an image. I tried the same type of command now, but without success. Is it (still) possible to resize images for rendering (if so, how?) or can this be implemented with the current Markdown renderer?

Current behavior

image

Expected behavior

image

Steps to reproduce

  1. Create a note with an image, here it was called aa79a1eb-khvynnn3.png (sorry for the name)
Image:  
![img](aa79a1eb-khvynnn3.png)
  1. In the precious version, this snippet would then show it resized (here: width to 300x)
Trying to rescale (width):  
![img](aa79a1eb-khvynnn3.png =300x)

Environment

Desktop/Web

  • Boost Note.next version:
  • OS version and name:
@Flexo013 Flexo013 added the feature request 🌟 Issue is a new feature request. label Nov 30, 2020
@Flexo013 Flexo013 changed the title Possibility to include resizing of image? Allow resizing of images Nov 30, 2020
@guneskaan
Copy link
Contributor

Looks like Markdown does not have a standard for image resizing. Discussions have taken place in the past on how image resizing in Markdown should be handled:

We have a few options for how we can integrate image resizing to our current implementation of Markdown parsing using unified.js and remark.js:

  1. Writing custom remark plugin to extend the parser and allow resizing inside paranthesis: https://github.com/remarkjs/remark/tree/main/packages/remark-parse#extending-the-parser
  2. Using remark-shortcodes to allow sizing inside brackets with attributes: https://github.com/djm/remark-shortcodes.
  3. Not supporting this in Markdown, and giving users the ability to use HTML <img> tag to specify custom style or size attributes

The PR I opened (#738) will give users the ability to use option 3.

I would like to hear what other developers think image rendering should be handled in BoostNote. @Rokt33r

@Rokt33r
Copy link
Member

Rokt33r commented Dec 27, 2020

@guneskaan @fzeiser 3. should be the best in my opinion. I'll close this after #738 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request 🌟 Issue is a new feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants