I just submitted this question, and I don't like the way my .png image renders. I often make diagrams in questions and answers using Microsoft paint, which produces a .png. In Physics stack exchange it displays always as big as humanly possible. Is there a way to make the picture display smaller?
2 Answers
I think you should not do what ACuriousMind suggested – directly linking to downscaled image URLs on Imgur – because the Stack Exchange software isn't aware of it, and as a result:
The downscaled image is used even on high-DPI screens, where it looks fuzzy. On my phone, the
m
andl
sized images in ACuriousMind's answer appear the same size; the only difference is that them
image is blurrier. Even on my 100dpi laptop screen, thel
image and the full-sized image are the same width, but thel
image is blurrier.Clicking/tapping the image to follow the link to the Imgur page still shows you the downscaled image.
If you use a downscaled image, then the full-sized image might as well not exist, except to the 0% of users (like me) who will manually edit the URL to delete the extra character. I assume the downscaled images are meant for thumbnail pages. I don't think it makes sense to use one of them as the only version of the image that will ever appear to anyone who sees your question. If the image really is overlarge, you should downscale it before uploading it to Stack Exchange.
There is a way to adjust the size of the presented image without reducing the pixel size, by writing an <img>
tag with a width
or height
attribute instead of the ![]
Markdown syntax:
[<img src="https://i.sstatic.net/4x2NJ.png" width="400" title="enter image description here">][1]
[<img src="https://i.sstatic.net/4x2NJ.png" width="250" title="enter image description here">][1]
It's annoyingly verbose, but it does the right thing on high-DPI screens, and it gives you more flexibility in choosing a size.
Note: HTML in posts is censored by an annoyingly restrictive regex. The attributes must be in the order src
, width
, height
, title
(with the last three optional), and must all be quoted.
-
$\begingroup$ On my phone, the m and l sized images in ACuriousMind's answer appear the same size; They look close in size, but they're definitely different on Firefox Focus & Safari browsers (iOS 16.6 on a XR). If you rotate into landscape mode, you can see the difference more clearly. $\endgroup$ Commented Sep 7, 2023 at 16:06
-
$\begingroup$ Just tried this out and it clearly works better (so I accepted this answer). But I'll note that there should definitely be a shortcut for this, or it should be the default way of attaching images. From now on every time I want to upload a png I'll come back to this post to copy paste this, which is kind of annoying. $\endgroup$– AXensenCommented Sep 13, 2023 at 12:46
You can get three different sizes from imgur pictures by manipulating the URL directly: For your example, we start with https://i.sstatic.net/4x2NJ.png
and append either s, m or l in front of the file extension:
[![enter image description here][1]][1]
[1]: https://i.sstatic.net/4x2NJs.png
yields
[![enter image description here][1]][1]
[1]: https://i.sstatic.net/4x2NJm.png
yields
and
[![enter image description here][3]][3]
[3]: https://i.sstatic.net/4x2NJl.png
yields
-
$\begingroup$ wonderful. thank you. I've fixed the post and several of my previous answers $\endgroup$– AXensenCommented Mar 30, 2023 at 11:50
-
$\begingroup$ You may also use HTML
<img>
, see meta.stackexchange.com/a/135909/334566 for details. $\endgroup$– PM 2RingCommented Mar 30, 2023 at 14:44 -
$\begingroup$ Microsoft Paint can also output files in other formats. (jpg, bmp, gif). Can I assume that a similar procedure will also work for them? $\endgroup$ Commented Mar 30, 2023 at 23:27
-
$\begingroup$ @D.Halsey Yes, this should work for all file formats supported by imgur. $\endgroup$– ACuriousMind ModCommented Apr 2, 2023 at 20:49
-
$\begingroup$ I think that this is a bad idea, and I wrote another answer explaining why. $\endgroup$– benrgCommented Sep 5, 2023 at 15:52