Skip to content

Instantly share code, notes, and snippets.

@uupaa
Last active November 15, 2024 08:20
Show Gist options
  • Save uupaa/f77d2bcf4dc7a294d109 to your computer and use it in GitHub Desktop.
Save uupaa/f77d2bcf4dc7a294d109 to your computer and use it in GitHub Desktop.
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png =250x250)

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png)

    • Copy <img> in browser DevTools. Replace ![](url) to <img>. Add width(and height) attr.
    • <img src="https://camo.githubusercontent.com/..." data-canonical-src="https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png" width="200" height="400" />

Other information

@Sandwich1699975
Copy link

The following worked well for me

<p align="center">
    <img src="assets/image.png" alt="Description" width="300">
</p>

The centring container is optional of course

@mjbear
Copy link

mjbear commented Oct 27, 2024

The following worked well for me

<p align="center">
    <img src="assets/image.png" alt="Description" width="300">
</p>

The centring container is optional of course

@Sandwich1699975
That's all fine and well except that markdown linters don't like inline HTML...

I found that out the hard way today. 🤷 😐

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