2

How do I display an image inline in a post or answer on Stack Exchange?

I've noticed other answers on similar questions show how to link to pictures, but don't show how to display a picture in a post.

I've answered the question below to help the community.

Note to community: I'm asking this (duplicate) question to provide the answer because the other (duplicate) questions like this didn't let me provide a more detailed answer since they were closed as duplicates, and the existing answers on all the existing questions like this didn't contain enough detail for me to figure out how to post inline pictures, although they were good hints to get started. My answer below is verbose and explains how to anyone.

Example of successful inline image:

5
  • 1
    If you think the existing answer to a question tagged faq isn't good enough, the proper procedure is to edit the answer or add a new answer there. Jun 5, 2018 at 18:45
  • I couldn't add an answer to the duplicates because they were closed for editing. Answer now added, here.
    – blueuser
    Jun 5, 2018 at 18:52
  • 1
    I have now added this answer to the FAQ. Perhaps we should leave this question here, since the FAQ question and answers don't come up in simple search queries on Google and DuckDuckGo, only other duplicates asked in the standard way. These duplicate questions and answers do not offer enough detail for the average StackExchange user to post an inline image (unlike the FAQ question and answers, which is adequate and now includes this answer as well). Note the FAQ question text may not be adequate for search engines and common keywords people would use searching this topic.
    – blueuser
    Jun 5, 2018 at 20:09
  • 1
    In case you missed it -- this is the FAQ page for this topic (posting inline images to StackExchange sites such as StackOverflow): meta.stackexchange.com/questions/75491/…
    – blueuser
    Jun 5, 2018 at 20:12
  • Yep, duplicates are often useful as a signpost for searchability purposes. Jun 5, 2018 at 21:10

1 Answer 1

5

First, in order to place an image inline (ON the webpage) in an answer (not a question post or answer to your own question), you must have enough reputation. For example, on meta.stackexchange.com (this site) you must have at least 5 reputation points. On Stack Overflow, you must have at least 10 reputation points to post an image / photo inline, ON the webpage, for an answer.

If you do not have enough reputation, when you are doing an answer to someone else's question, or editing an answer to someone else's question, using the method I provide below, Stack Exchange will give you an error message when you try to save your answer stating you do not have enough reputation to include an image using the method provided below.

There is an exception to this rule: if it is your own question post or an answer to your own post, you don't need any amount of reputation to include an inline image, as I have done below in this answer and in this question above.

You may still link an image (instructions for doing so are on the "advanced help" page linked at the top of the edit box) on an answer that you do not have enough reputation in order to post an inline image, but you may not post an answer to someone else's question with an inline image until you have enough reputation.

Note that if you use the graphical / GUI way of adding an inline image to a question post or answer, by pressing the button on the WYSIWYG post/answer editor, and you do not have adequate reputation for adding an inline image, no warning will be displayed by Stack Exchange indicating you do not have the adequate reputation for including inline images on your posts on the given Stack Exchange site you are using, and your image will simply be linked to and not included inline on the webpage, with no warning.

Please note, reputation on one Stack Exchange site like Stack Overflow does not carry over to other Stack Exchange sites, like this one: meta.stackexchange.com. So you may be able to post inline images in answers to other people's questions on some Stack Exchange sites and not others, until you have adequate reputation on the site your current answer post targets.

In order to post an answer to someone else's question with an inline image, assuming you have enough reputation on your chosen Stack Exchange site (i.e. Stack Overflow), or to post an a question or an answer to your own question with an inline image (doesn't require a minimum amount of reputation) you may use the following syntax:

![](https://i.stack.imgur.com/bmuVz.png)

It will look like this (inline image on webpage) if you have done so correctly and have adequate reputation:

Note that you now appear to have to use https: as the protocol in the link for inline images.

This detail escaped me at first, and doesn't appear to be documented in "advanced help" for markdown on posts.

Most free widely-available public image hosting sites, including Imgur and tinypic, offer HTTPS hosting, and all you have to do is take the link they provide you, like: https://i.stack.imgur.com/bmuVz.png and change the http to https: like so: https://i.stack.imgur.com/bmuVz.png.

Then add the link in your post or answer like:

![](https://i.stack.imgur.com/bmuVz.png)

and, BOOM!, you should have an inline comment!

I hope this helps. I found this very confusing at first, and I found the documentation very lacking. Perhaps the lacking documentation is intentional, so that everyone isn't posting pictures inline and posts which can be difficult to moderate (a picture could contain anything, right! hard to filter automatically). However I find inline pictures in posts and answers invaluable, so hopefully this helps you!

For resizing images: Resizing an image in a post?

FAQ page addressing this issue: How to upload an image to a post?

Hopefully Google and DuckDuckGo pick up this post so people can find it easily. I was unable to find this FAQ easily for this issue using simple Google queries. This post is an ordinary (duplicate) question with several keywords in the question and the answer that people are likely to use on a search engine.

11
  • 1
    Note that this still a duplicate of the FAQ post. As I said, if you believe that the answer on the FAQ isn't good enough, you should add an answer there. (The question I linked isn't "closed for editing"; just feel free to post a new answer there.) Jun 5, 2018 at 18:54
  • On some sites there's a restriction to show uploaded images inline. Jun 5, 2018 at 18:54
  • Also, the FAQ answers are maintained by the community, so it's entirely possible that they grow out-of-date if nobody bothers to edit them. A new answer there is absolutely welcome. Jun 5, 2018 at 18:55
  • @SonictheInclusiveHedgehog where is this FAQ? Is it what is linked "advanced help" on the textbox for editing/adding posts and answers?
    – blueuser
    Jun 5, 2018 at 18:58
  • 1
    @SonictheInclusiveHedgehog I followed the link you titled: "faq" and it didn't take me to a faq page covering this question, but rather a collection of links to what appear to be various faq posts. Could you please comment a link to the faq page you are referring there, and I'll copy my answer over there. I'm just trying to help! (;
    – blueuser
    Jun 5, 2018 at 19:01
  • I'd recommend deleting this answer, since it's now on the FAQ post and will thus reduce clutter. Jun 5, 2018 at 21:11
  • quoting you: "'Yep, duplicates are often useful as a signpost for searchability purposes.' – Sonic the Inclusive Hedgehog" I don't know if you posted this "I'd recommend deleting this answer..." after the quote I've included of you here, or before. Do you still think I should delete this page/question and this answer? If you think I should keep this duplicate question for searchability purposes, but delete the answer only (one possible interpretation of your comments so far) I'd argue a few things:
    – blueuser
    Jun 5, 2018 at 23:04
  • 1
    @SonictheInclusiveHedgehog : 1) the answer on this page has useful keywords in conjunction with the question -- to be on a single page for SEO purposes. 2) if users arrive at this question page and it has a link to the FAQ, that's 2 clicks to get to the answer and the thinking involved... perhaps having the answer to the question on this duplicate page is more useful and outweighs the cluttering aspect? What do you think? I'll delete it if after considering these things you still think it would be best to delete, as I do not have as much experience with StackExchange as you I'd guess.
    – blueuser
    Jun 5, 2018 at 23:06
  • 1
    The reason why this answer should be deleted is because when certain users browse to duplicate questions without answers, they are automatically redirected to whatever the question's closed as a duplicate of. The question should be kept, as it also has the keywords. Jun 5, 2018 at 23:19
  • You didn't address the concern I had about the ramnifications of deleting the answer and leaving the page with only the question, in that the question paired with this answer on the same page is better for SEO than having only the question, considering that the keywords in the question and the answer are both applicable to the best SEO outcome, particularly when they are paired. Either way, I'm deleting this answer in 30 minutes (giving you enough time to see this comment).
    – blueuser
    Jun 5, 2018 at 23:45

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