1

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.

1 Answer 1

3

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.

[![](https://i.sstatic.net/zFhbRm.jpg)](https://i.sstatic.net/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="https://i.sstatic.net/zFhbR.jpg"><img src="https://i.sstatic.net/zFhbR.jpg" width="200" height="100"></a>

6
  • 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 Mod
    Commented Dec 19, 2013 at 22:58
  • @slm What risk do you envision? Commented Dec 19, 2013 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 Mod
    Commented Dec 19, 2013 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 Mod
    Commented Dec 19, 2013 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. Commented Dec 19, 2013 at 23:09
  • Yeah I'll just have to adapt to doing that way instead. Thanks for the tip.
    – slm Mod
    Commented Dec 19, 2013 at 23:10

You must log in to answer this question.

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