Add setting to disable hotlinking of large image files

@vinothkannans the 1 on both sides is confusing

1 Like

Also there should be an alt="image too large to display" tooltip on that, for mouse-capable devices. That will need to be translated but we do this in a bunch of places already.

3 Likes

I linked large image placeholders to the original external image url. The above problem comes when that image is already linked. Then the html structure got broken since it have two links.

So what if the large image already linked. Should I skip by not linking again with original image url?

Also go with grey for both icons, not blue or black. This is more correct and more color scheme neutral.

1 Like

Currently it is with default text color. Okay I will change it to gray.

1 Like

Hmm how is blue the default text color? Do you mean default link color?

image

1 Like

Yeah, it is pulling it from the a and a:visited rules.

2 Likes

Yes. Since it is font icon colors automatically comes from text colors.

I will do both of it on new PR. Also I am waiting for a solution to below problem. Can you @codinghorror or @sam suggess me any way to handle this situation.

If skipped then user can’t see the image at all.

I am not following what you are asking here. I would like the tooltip and color changes to go in ASAP.

1 Like

Would it be possible to skip the linking only if the image is already linked?
But thinking about it, is it even possible to hotlink an image and add a link to it?
I don’t think it’s possible with Markdown, or is it? Maybe HTML works?

http://img0.joyreactor.cc/pics/post/%D0%B3%D0%B8%D1%84%D0%BA%D0%B8-superjail-%D0%BC%D1%83%D0%BB%D1%8C%D1%82%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB-%D0%A1%D0%B2%D0%BE%D1%8F-%D0%B0%D1%82%D0%BC%D0%BE%D1%81%D1%84%D0%B5%D1%80%D0%B0-1886210.gif

No, it doesn’t. Could you show me an example where this is an actual problem?

So, I’d say, just make sure that there is only one link to the image in the cooked post and that is has the rel="noflooow noopener" set.

Okay. I will do both of it ASAP.

The problem I am trying to explain is

Let’s say example.com/image.jpg is larger image than allowed size.

<img src="http://example.com/image.jpg">

Above RAW will be cooked as

<a href="http://example.com/image.jpg">
  <span class="large-image fa fa-picture-o"></span>
</a>

Now the problem comes when the image already linked in RAW like below

<a href="http://google.com">
  <img src="http://example.com/image.jpg">
</a>

Example:

I linked above image to google.com.

Yes. It is possible when we cooking it as HTML.

3 Likes

Now the above example image is changed as

<a href="http://google.com" rel="nofollow noopener"></a>
<a href="EXAMPLE_URL" target="_blank">
  <span class="large-image fa fa-picture-o"></span>
</a>

Would it be possible to change

<a href="http://google.com">
  <img src="http://example.com/image.jpg">
</a>

into this?

<a href="http://google.com" rel="nofollow noopener">http://google.com</a>
<a href="http://example.com/image.jpg" rel="nofollow noopener" target="_blank">
  <span class="large-image fa fa-picture-o"></span>
</a>
1 Like

Yes. It is possible to cook the HTML like your example.

4 Likes

I believe this is mostly complete because large images don’t embed, and show a warning now courtesy of @vinothkannans – what do you think @sam?

(the following is a 5.26mb, 3264×2448 image)

I am still seeing an undesired behavior.

Create a post with the only content being: “http://i.imgur.com/u01fq8I.gif

Expected behavior:

  • Image has no thumbnail and just displays as a text link, or the image is served from an https URL.

Actual behavior:

Hold on, it actually does the correct behavior, but only after page refresh.

image

Why would you explicitly link to the http version when the https version also works? I feel like this is a totally different request unrelated to what we implemented.

Yes this is working, going to close this as complete.

2 Likes