Images/GIF behave differently depending on if they are self-hosted or linked


#1

Extremely visible here:
https://meta.discourse.org/t/copy-paste-images-in-chrome-for-mac-creating-huge-images/14558/10?source_topic_id=25522

Self-hosted on Discourse

Hosted on Imgur

Clicking on the Self-hosted one does nothing and there is no click counter
Clicking on the Imgur-hosted one opens the image in the current tab and a click is registered/counted


Self-hosted on Discourse

Hosted on Imgur

Clicking on the Self-hosted one opens the onebox… fine!
Clicking on the Imgur-hosted one again opens the image in the current tab.


(Jens Maier) #2

Let’s test:


http://i.imgur.com/iTQ93U9.png

This gets turned into an embedded image by, I’m assuming, the onebox code.


<img src="http://i.imgur.com/iTQ93U9.png">

This image is downloaded, scaled down and turned into a lightbox by the system task.


(Jeff Atwood) #3

This has to do with the size of the image. Try it with a tiny image. As mentioned earlier, it is the resizing and light boxing to fit.


#4
  1. There is no way to see if an image is oneboxed or not up until you hover over it
  2. Oneboxing the image vs using img tags is different
  3. Click counts are different

I find it very weird that it has to be so inconsistent. I want to be able to click on all resized pictures to have them zoomed in, not only those who are in <img> tags. Also, either count all clicks or count none, any other way is just confusing, users shouldn’t have to care about this.


(Jeff Atwood) #5

Sure there is,

  • if the image is the full width of the post, I guarantee you it is lightboxed.

  • If the image is smaller than the full width of the post, it is not lightboxed.


#6

img tag, uploaded

img tag, imgur link

imgur link

The third one does not get oneboxed. The picture is 5000 pixel wide.


(Jeff Atwood) #7

That’s true. So I guess the issue is whether the image is converted to local or not.

For some reason this was disabled on meta @zogstrip which is not the default. I suspect that error where disk size was calculated incorrectly triggered it to turn off.