dadler/thumbnail-zoom — Issue #23: Recognize links point to images w/o .jpg (eg lightbox or mime types)
Author: dadler
Created: 2011-12-11 18:43:06+00:00
State: open
Labels: -med-, SUG

The "Others" rule sometimes rejects a link which it could actually display as a popup image because it can't tell from the link URL that it is in fact an image.

For example, [rootzwiki.com](http://rootzwiki.com/_/articles/apps/experience-onlive-for-android-r205) links to images without .jpg, but uses lightbox. We could easily detect a lightbox link by looking at its "rel" attribute. It'd take a bit of restructuring to allow links to be accepted based on attributes and not just the URL, but this would make all lightbox sites work with Thumbnail Zoom Plus.

An even more general method would be to always try to display the target even if it's an image, and just let it fail to load if it's actually a web page or something else. While that would let the largest number of images appear, it'd have the unfortunate side-effect of downloading lots of content we can never possibly display, including potentially larget files. It also risks crashing the browser if it doesn't handle malformed (non-) image data well.

A third approach would be to download just the HTML header of the link's target to check its mime type. That might be the best approach, assuming sites do mime-type images correctly. I'd have to research how to do that, though.