Is it possible to resize an image in an answer? For example, How important is PhD research topic to getting a job? has an answer that should have the image in the answer, but it's too big.
Is there a way to handle resizing?
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.Sign up to join this community
Where the original might be something as obscenely large as this:
s character at the end of the file name, just before the file extension, like so:
You can whack in good ol' HTML for that and force client-side resize:
<img src="http://example.com/path-to-ghosts.jpg" width="100" height="100">
But, it's up to you to work out what a good set of resize dimensions will be.
You can also add a query string like
?s=xyz (with xyz = 16, 32, 64, 128, 256 or 512) after the name of the image to change it from
gSpBi.png to (eg)
gSpBi.png?s=128. I.e I just added the query string
?s=128 right after
.png. Attention: sometimes part of the top and bottom are not shown (I think it depends a bit on the actual image you're using).
Some examples of using such query string in an image, for xyz = 16, 32, 64, 128:
Btw, the above also shows that you can even insert some text in between 2 images, though such text seems to have these limitations (at least I have no idea yet how to get around those):
Note: The currently accepted answer doesn't mention that you do need to respect some specific HTML formatting syntax, in order to be able to use the
img HTML tag. E.g. to create these 3 variations (sizes) of an image:
Here is the HTML source that created the previous 3 images:
<img src="https://i.stack.imgur.com/gSpBi.png" width="216" height="180" alt="Babou" title="My Patou"> <img src="https://i.stack.imgur.com/gSpBi.png" width="270" height="225" alt="Babou" title="My Patou"> <img src="https://i.stack.imgur.com/gSpBi.png" width="135" height="113" alt="Babou" title="My Patou">
PS: I only learned about these things via browsing of sources, and experimenting, I am not aware of any documentation about this.
If it helps anyone else here is one more hack that would make a post readable when referencing large images:
In the description you will have this to reference an image
[![My App TouchID authentication]]
At the bottom of the page I have defined 2 images, one was automatically created when I uploaded the image and the second one I created
: http://i.stack.imgur.com/PieY5m.png : http://i.stack.imgur.com/PieY5.png
Notice the only difference between 2 and 4 is the m. Going back to the markdown for the image
The  reference is used inside the image tag uses the medium sized imgur.com image. The  next to the image tag references the link that the image would link to, this is the larger image uploaded to imgur. You can replace m.png with s.png as mentioned by random.
Hopefully this helps someone.