2

Is there any way to make images that are included in a Q & A open in a larger view when either clicked on or hovered over? Some times I need to post a larger image than will fit, but I don't want to necessarily have a large image take up a lot of space in the normal view.

| |
4

Include a smaller image in your post and link to the larger image.

With images uploaded to Stack Exchange's imgur server (as they should), you can add s or m to get a smaller image.

[![](http://i.stack.imgur.com/zFhbRm.jpg)](http://i.stack.imgur.com/zFhbR.jpg)

You can also specify width and height attributes in the img tag to perform arbitrary resizing. If you specify only one, the aspect ratio is kept.

<a href="http://i.stack.imgur.com/zFhbR.jpg"><img src="http://i.stack.imgur.com/zFhbR.jpg" width="200" height="100"></a>

| |
  • Is there any risk in doing it like this? [![ss of nmon][4]][4]? Seems to work on this Q&A: unix.stackexchange.com/questions/105908/… – slm Dec 19 '13 at 22:58
  • @slm What risk do you envision? – Gilles 'SO- stop being evil' Dec 19 '13 at 23:00
  • I was thinking there might be issues with the renumbering of links that the editor does for you if you insert another link above this one. I can try, but wasn't sure. – slm Dec 19 '13 at 23:01
  • Just tried and it breaks the numbering if you try and put something in front of a link that includes [![ss of nmon][4]][4]. – slm Dec 19 '13 at 23:02
  • @slm Oh, well, I don't use the numbering. Just use the direct URL form and the editor won't bother you. – Gilles 'SO- stop being evil' Dec 19 '13 at 23:09
  • Yeah I'll just have to adapt to doing that way instead. Thanks for the tip. – slm Dec 19 '13 at 23:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .