56

Every day I find posts that have linked to an off-site image instead of embedding the image in the post. I usually go in to make the edit of embedding the image but realized that 99% of the time I'm linking to a file instead of uploading it.

The current image upload modal allows you to upload via drag and drop, but to get the modal to display the text field to link to an image hosted elsewhere (e.g. imgur) you have to click on the "You can also provide a link from the web." link to expose it:

enter image description here

What's the point? Why not just always show the text input that would appear by clicking the link?

enter image description here

Is there some need to hide the text field behind a link? Making it always visible is a very simple change and removes an obstacle that doesn't need to exist.

7
  • Requiring a user action to get a link allow to make statistics of number of links shared, and if they displayed it directly they would have no way of knowing who used the link or not. Secondly, maybe they only generates a direct link access for users that ask for it because it cost more (it forces them to save a link between the exact location of the file and a hash).
    – Stnaire
    Commented Sep 27, 2015 at 8:16
  • I think it's a way to encourage users to upload their images instead of using a link, keeping it consistent over imgur. Althought it's also uploaded to an image hosting service, some images are hosted on places that could eventually go down, leaving the post without some context. Also, since there's some partnership between SO and imgur (See stack.imgur.com), there's even more chance to keep the content alive for long. Commented Sep 28, 2015 at 1:37
  • 4
    @GeorgeRappel Maybe that would make sense if images uploaded via the "Link from the web" option weren't also uploaded to stack.imgur.com.
    – IKavanagh
    Commented Sep 28, 2015 at 14:24
  • Does it help prevent bots from hitting that field?
    – BSMP
    Commented Sep 28, 2015 at 18:08
  • 2
    I think the first image says "you can upload OR link from the web". The second, otoh, I suspect one could see it as "you can upload AND link from the web" (I mean, there are two "fields" of input, people could get confused - even if for a short period only - and imagine both are needed). The second field may also "steal" attention from the upload box above altogether.
    – acdcjunior
    Commented Sep 29, 2015 at 6:50
  • @acdcjunior- Then they could simply prepend "Or link from the web..." to the text field.
    – j08691
    Commented Sep 29, 2015 at 13:25
  • 3
    There is no ulterior motive here. We're only doing this to minimize the number of fields shown on the modal. I'm not sure we want to always show the link box, but considering the number of upvotes here, we'll give it some thought.
    – Thomas Orozco Staff
    Commented Oct 2, 2015 at 7:59

3 Answers 3

20

Easy enough for a userscript...

var header = document.getElementById('header');
if (header)
{
    new MutationObserver(function(records)
    {
        records.forEach(function(r)
        {
            Array.prototype.forEach.call(r.addedNodes, function(n)
            {
                if (n.classList.contains('image-upload'))
                {
                    new MutationObserver(function(records, self)
                    {
                        var link = n.querySelector('.modal-options-default.tab-page a');
                        if(link)
                        {
                            link.click();
                            self.disconnect();
                        }
                    }).observe(n, {childList: true});
                }
            });
        });
    }).observe(header, {childList: true});
}

[ Direct Install Link ]

2
  • 1
    Would you mind if I used this in my SE Additional Optional Features userscript as a new feature? Commented Sep 29, 2015 at 20:02
  • 1
    @ᔕᖺᘎᕊ Do with it whatever you like. I'm just happy if it helps anyone. :)
    – Siguza
    Commented Sep 29, 2015 at 20:24
6

The image uploader has changed quite a bit since this question was asked and, while the URL input isn't always visible, it's not necessary to click to paste a link, as the uploader recognizes a link paste whenever if it's open.

The image uploader upon opening it. Text reads "Browse, drag & drop, or paste an image or link.

After paste:

The image uploader has changed from the option to upload to just showing the URL input with the pasted URL in position.

As such, I'm marking this status-completed since I feel like it fulfills the spirit of the request despite not matching it exactly.

3
  • 2
    But isn't that the editor that's going to be phased out? The new editor doesn't even have a place to insert a URL — we've gone backwards in this regard. You cannot upload an external URL when you don't have the control characters on your keyboard (mobile).
    – Laurel
    Commented Jan 31, 2023 at 4:27
  • 1
    I'm not quite sure why the new editor doesn't allow pasting an image URL when it says that you can in the description... it doesn't seem to work when I try. It's possible that it's just implemented wrong - the image uploader on Teams is different, and doesn't allow using URLs.
    – Catija Staff
    Commented Jan 31, 2023 at 21:40
  • It seems that there was a setting that needed to be enabled that will turn on the URL pasting. They're working on getting that going. That will only allow copy pasting but won't allow pasting from a clipboard. To do the latter, we'll need to build that in, which will take more time. Thanks so much for bringing this to our attention, @Laurel!
    – Catija Staff
    Commented Feb 1, 2023 at 15:43
0

There is a tactical concern and a strategic. Should we do it at all, and if so, are there any UI issues with just showing the input box as is in your screenshot.

Lets assume that making it easier to link is the desired goal. Taking a look at your screenshot, my first thought is...

And vs Or

Right now, we have an "or" situation. Linking is an alternative. The primary action is upload, and secondary option is linking.

If the input is immediately, it indicates an "and" situation. Drag and drop, will it then appear in the box? It's confusing to the end user. Granted, the audience here is more technical than your average web user, but that isn't an excuse for poor UI.

If we want to go with always visible, we should put in, centered and between the two, the word "Or:". If we make that clear, then we have increased the ease of linking without hurting anything else. However, do we really want to do that?

Encouraging Upload over Linking

We want to encourage uploading because it helps future-proof images. Screenshots and mockups are vital to many questions. If a linked image disappears, it could make the question much less useful. Uploading decreases the chance of this.

Because of that, making it easier to link is probably a direction that the site shouldn't go in.

2
  • 1
    That's not a mockup I posted, those are the current actual modals.
    – j08691
    Commented Sep 29, 2015 at 13:24
  • You are correct. My fingers moved faster than my brain there. Edited. However, the two points remain the same.
    – Kelderic
    Commented Sep 29, 2015 at 13:30

You must log in to answer this question.

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