adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
10.26k stars 2.72k forks source link

[Enhancement]: Resize pictures in markdown #1577

Closed suiyuanla closed 2 months ago

suiyuanla commented 3 months ago

What you'd like to propose?

When I add an image in Markdown, it centers, maintains its aspect ratio, and takes up the entire width of the article. This looks great most of the time. However, in cases where the image itself is small, it gets scaled up significantly, which looks awkward. I wish there was a way to adjust the image size, perhaps with something like ![alt text](/path/to/picture?width=400px&height=300px), while keeping the resized image centered on its own line.

I have searched in the wiki and the repo, can't find the solution. Please excuse me if this feature is already implemented.

Code of Conduct

adityatelange commented 2 months ago

centring is possible with path/someimage.jpg#center

height, width is not possible as we're building statically.