-3

Every day there are a lot of images of code that appear in questions, which is, unless absolutely necessary, against the rules.

My question is: Why doesn't SO make it harder for users to use images? For example, SO could only allow external links as images; a user would then need to upload their image in an other site (a StackImages or whatever), copy the given link and paste it in their question. IMHO, that extra step might be enough to prevent almost all the "code-as-image" questions.

6
  • 4
    Stack Overflow, at least what I know, doesn't like to improve itself. But ignoring that, it would be inconvenient for users who can't depend on external sites to upload and share their images. A better way might be to add a simple check which asks the user if the image is used to share code if the question does not contain code blocks or in-line code. It could also probably check for code using AI, but only if the question does not have code as text. That would reduce the chances of code-as-images, and the process would be clearer; your solution isn't fool-proof, I guess. Commented May 27, 2023 at 20:43
  • 5
    @BrianTompsett-汤莱恩 Unfortunately,"Discourage screenshots of code and/or errors" isn't a duplicate of this question, because SE changed to using the New Question Wizard and using the Stacks Editor, which doesn't show the warning about not using images for code, or even one about not being able to embed images. It just lets you upload the image without saying anything about it.
    – Makyen Mod
    Commented May 27, 2023 at 21:04
  • 4
    Maybe the first image they post, they have to type "I will not post images of code" into a text box.
    – CPlus
    Commented May 28, 2023 at 3:12
  • @user16217248 That would definitely be a better solution; and with the text to be typed as an image, for preventing copy/pasting^^
    – Fravadona
    Commented May 28, 2023 at 11:57
  • @Fravadona Correct, that would be ideal.
    – CPlus
    Commented May 28, 2023 at 18:07
  • "external links" to images would even be worse: less control, that is, they can be changed, deleted, blocked, ... invalidating the question; and would force users to click/open eventually unknown links (for example, I avoid external links that I do not know the domain) Commented May 28, 2023 at 22:16

1 Answer 1

11

Why doesn't SO make it harder for users to use images? For example, SO could only allow external links as images; a user would then need to upload their image in an other site

Because images can be required to properly explain an issue, and questions must be self-contained

UI issues, for example, often require a screenshot to show the observed result, in contrast to the expected result. Being able to upload images to the official Stack Exchange hosting, even if it's displayed as a link, accomplishes the goal of having it be self-contained.

Forcing users to use off-site hosts for this is not an acceptable solution, and creates far larger problems. There are dozens of image hosts. They regularly shut down, breaking all links to them. Or sometimes they might change their policy in a way that threatens to break tens of thousands of images in Stack Exchange posts. It's not acceptable for questions to rely on off-site links in any way for essential information, just like it's not acceptable for answers to do so.

The correct solution is to just put back the warning not to do this, as has been requested multiple times now.

5
  • If images can be required to properly explain an issue, then images shouldn't be disabled in questions for new accounts. Commented May 28, 2023 at 1:12
  • @SamuelLiew Definitely the case for many questions involving image processing or computer vision.
    – Dan Mašek
    Commented May 28, 2023 at 13:58
  • 1
    @SamuelLiew New users can upload images to Stack's Imgur hosting and link that image. Doing so is handled automatically within the editor. What's prevented is for new users to have the image displayed inline. There are really good reasons for that, as displaying inappropriate images is something that is abused on other sites on the network. There are definitely some images that have been posted on Stack Exchange which I wish I'd never seen. We really shouldn't be allowing random new accounts to subject other users to such things, thus the restriction on displaying images inline.
    – Makyen Mod
    Commented May 28, 2023 at 14:07
  • 1
    Images can obviously be important, but I think banning them for sufficiently new and/or low rep users would still be huge win overall. The probability of such a question being a good fit for the site is quite low. Commented May 28, 2023 at 14:47
  • 1
    @PresidentJamesK.Polk I'd rather not do something that would force new users asking a certain class of questions (those in which an image is important) to ask the question in a way that does not comply with quality requirements. If it's such a problem that we're considering banning image uploads entirely, I'd much prefer requiring such users to affirmatively acknowledge that the image is not code, data, an error message, or other text before being allowed to upload it.
    – Ryan M Mod
    Commented May 28, 2023 at 22:59

You must log in to answer this question.

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