No, you need to define width and/or height attributes to define an image's size, and those attributes only support pixel units. GitHub does no support using the style attribute.
As documented in the github/markup project:
This library is the first step of a journey that every markup file in
a repository goes on before it is rendered on GitHub.com:
- This library converts the raw markup to HTML. See the list of supported markup formats
below.
- The HTML is sanitized, aggressively removing things that could harm you and your kin—such as
script tags, inline-styles, and class or
id attributes. See the sanitization
filter
for the full whitelist.
- Syntax highlighting is performed on code blocks. See github/linguist
for more information about syntax highlighting.
- The HTML is passed through other filters in the html-pipeline that add special
sauce, such as
emoji,
task
lists,
named
anchors,
CDN caching for
images,
and
autolinking.
- The resulting HTML is rendered on GitHub.com.
Of note is step 2. Specifically style tags are stripped from any user provided content on GitHub's website. However, a review of the sanitation filter indicates that height and width attributes are whitelisted and not stripped. Note that width and height attributes can only use pixels as units. Therefore, you cannot us any other type of units to define an image size. Your img tag may look like this:
<img src="myimg.png" width="20" />
Of course, you'll need to adjust the actual size to your desired value.