text icon indicating copy to clipboard operation
text copied to clipboard

Ability to resize/scale/format images

Open l-mb opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. Attaching an image (say, in Collectives) will embed it, but with no possibility to further format the layout - alignment, scaling, etc.

Describe the solution you'd like I'd love the ability to scale/resize, possibly align, the image further in the page.

Describe alternatives you've considered The most basic Markdown syntax does not support this, but see, for example: https://medium.com/markdown-monster-blog/getting-images-into-markdown-documents-and-weblog-posts-with-markdown-monster-9ec6f353d8ec for an option (MD could just embed the img tag as raw HTML in this case).

https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to shows that GH does it similarly.

Alternatively, it could be done via a fenced code block extension that then specifies attributes via YAML, say:

```image
url: path/to/kitten.jpg
width: 500px
align: center
alt: Picture of a sleeping, curled up, grey kitten.
```

that might be fairly extensible for the future?

Wikitext also has support for this: https://en.wikipedia.org/wiki/Help:Wikitext#Images

Additional context

I came here from https://github.com/nextcloud/collectives/issues/378, realizing that this needs to be in text, not collectives.

l-mb avatar Jul 20 '23 16:07 l-mb

Copied from https://github.com/nextcloud/text/issues/318#issuecomment-2334205190:

rvjr commented Sep 6, 2024 3 days ago:

Gitlab supports this in its MD markup since some time now, and I think it really helps readability in many cases if you can size images as intended.

See this close issue for reference: https://gitlab.com/gitlab-org/gitlab/-/issues/28118

mejo- avatar Sep 09 '24 09:09 mejo-