11

I would like to include an image in a question I'm asking on StackOverflow. However it is a large image and takes up more space than I'd like it to. I'd like to scale it down a bit without having to create a new image

I tried to use an img tag, but once I added a style, height, or width attribute it hid the image

Is there a way to scale down the image once the link is added in the question?

  • 1
    Scale it down before uploading it? – Won't Aug 30 '13 at 20:48
13

If you want to use width, you must put it after the src and surround it with double quotes. Example (using your profile picture):

Code:

<img src="http://i.stack.imgur.com/rwTPK.jpg" width="50">

Result:

Code:

<img width="50" src="http://i.stack.imgur.com/rwTPK.jpg">

Result:


Also note that if your image is hosted by imgur, you can put an s, m, or l before the extension (for small, medium, and large respectively):

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

You must log in to answer this question.

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