13

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
  • 1
    Scale it down before uploading it?
    – user1228
    Aug 30, 2013 at 20:48

1 Answer 1

15

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="https://i.stack.imgur.com/rwTPK.jpg" width="50">

Result:

Code:

<img width="50" src="https://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):

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

2

You must log in to answer this question.

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