# Recommendation: enhance the mathSE HTML/Markdown help article re images

Turns out, based on the responses, that the topic is much more complex than I first envisioned. One alternative is for someone to edit the corresponding Help article (referenced below), with a link to this article.

Then, the user can read the full details about the issue of image sizing. In the meantime, whenever I reference the corresponding Help article, I will also reference this article.

The Images section, at the bottom of this article, documents how to embed images into a mathSE question or answer. I recommend enhancing that section of the article to include something like the insertion in this posting, that follows the Edit section:

Edit
Thanks to Ray Butterworth's answer for an idea that I totally overlooked. I have edited the suggested insert (below) accordingly.

Actually, I don't know what to make of his response. I am assuming that if no width parameter is provided, then the default will be whatever the pixel-width of the uploaded image happens to be. My guess (which could be wrong) is that if you are using a middle-of-the-road display resolution (whatever that means), then it would generally be best to adjust the width until it looks suitable to you.

Edit
Re the article referenced in Calvin Khor's comment, in my opinion, specifying absolute pixel size seems to give the most flexibility. Therefore, the only concept that I took from the article for insertion into the suggest edit (below) concerns optionally changing the aspect ratio.

Start of Suggested Insert

You also have the option to control the size of the displayed image via the following syntax:

<img src="https://i.stack.imgur.com/m2uYu.png" width="200">

When formatting your posting, you can experimentally change the width parameter above to find the image size that you regard as the most suitable for your posting.

You can also specify the height only (instead of the width). Further, if you don't mind changing the aspect ratio change, you can specify both the width and the height:

<img src="http://i.stack.imgur.com/m2uYu.png" width="300" height="500">

Be aware that, in general, using absolute sizes can produce something that looks good on your screen, but awful on other people's. For example, to someone with a 4k monitor, a 200 pixel image will look tiny, since it is only 5% of the width of the screen. However, to someone using a low resolution monitor, the image may be seen as huge, depending on just how low resolution the monitor is.

End of Suggested Insert

My motive in making this recommendation is that when I post a comment that refers a user to the corresponding help article, I will no longer need to supplement my comment with the additional instructions that pertain to controlling the size of the image.

• There are examples and an alternative way (using a syntax not of HTML or Markdown, but of Imgur) here (iirc the imgur implemented method gives you a subpar picture) Jul 22 at 2:41
• @CalvinKhor +1 : Interesting. See my edited posting. Jul 22 at 3:58
• Well, there is a balance between flexibility and ease of use, particularly if you want "the masses" to use it. When you use the GUI to upload images, it generates Markdown for you. Imagine that you do not know HTML but want to use a smaller image; it is then much simpler to edit the already generated Markdown by adding s or m to the URL Jul 22 at 4:21
• @CalvinKhor Good point. If a moderator adopts my recommendation and edits the Help article, then they will have a decision to make, about how much technical detail to include. From what you have commented, I think there is merit on both sides of the issue of whether to include the options of adding (for example) s or m to the URL. Jul 22 at 8:18

• @MikeEarnest With HTML itself no. Presentation, such as size, is no longer a part of HTML. That the <img> tag still has a width attribute is a holdover from when it took a long time to download the image. All formatting should be done using <style>, but I don't know much at all about what user-supplied HTML or style is supported by Stack Exchange. ¶ In general, images should have style something like either height="auto" width="33%" min-width="15em" (for visual images), or height="5em" width="auto" max-width="100%" (for images with text or other fine details), with no absolute units. Jul 22 at 17:56