161

Sometimes I need to upload, embed, or display inline an image in a question or answer. How can I do that?

Return to FAQ index

0

1 Answer 1

127

Note: Some sites require 10 reputation to embed images in posts. On those sites, you can still upload images using the below tool, but you won't be able to embed those images; you can only link them. Another user with the required reputation can edit image links into embedded images.


How can I add an image to a post?

As explained when image hosting was introduced:

adding a picture to a question or answer is now as easy as …

  1. Clicking the Insert Image toolbar button toolbar button

  2. Selecting an image from your computer, or the web

  3. Clicking Upload

After that, replace the default "enter image description here" with something meaningful. For the screen readers of visually impaired, for browsers that don't show images, and for search engine indexes: please enter a good description - you will be warned if your post doesn't contain a custom description.

Image of image uploader

Even when pasting a URL from the web, the image will be copied to the Stack Exchange image host, and hence will stay even if the original image link is broken.

Note that in addition to using the image upload toolbar button, you can also drag and drop images directly into the editor, and if your clipboard contains image data, you can paste it into the editor - in both cases, the image uploader will pop up automatically and give you the option to upload the image.

What if I just want to link to an image?

If you don't have the required reputation to embed an image on a site that requires it, or you just want to link to an image for another reason:

  1. Use the steps above
  2. Remove the leading exclamation point from the result: [click for my image][5]

Can I embed images from other sources?

It is highly recommended that you upload images to Stack Exchange servers, to prevent the post from being broken if the linked image is removed or changed by the image host.

If you really want to hardlink images from another source, without copying them to Stack Exchange servers:

  1. Use the link tool to make a regular link to the image.
  2. Type the image description in the link label field: [Image description][6].
  3. Prepend the link with an exclamation point: ![Image description][6].

Be aware that the image will disappear if the link gets broken.

Note that the image must come from an HTTPS source in order to be able to be embedded. Images from HTTP sources cannot be embedded and can only be linked, to prevent "mixed content" warnings. All images uploaded to the Stack Exchange image server in the manners above are from an HTTPS source and will display properly.

Anything else I should know about images in posts?

  • To make it easier to find relevant information using search engines, be sure to copy important text into your post too. (Messages from popup dialogs can often simply be copied using Ctrl-C or Command-C.)
  • Whenever possible, use the Stack Exchange provided hosting as described above. This ensures images are never lost. Images on many other free image hosts will expire if not requested every now and then, and the post should be useful for future visitors. Also, this is necessary if your image is from an HTTP source, as such images cannot be embedded for security reasons (see above).
  • Your image/picture can be placed anywhere within your post. The easiest way is to place your cursor where the image should appear, before you click the Picture button.
1
  • 1
    The icon is not present in the new toolbar... Commented Oct 24, 2021 at 8:29

You must log in to answer this question.

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