The Big Picture

By Thomas Rosenau Last update Mar 8, 2009 — Installed 240 times.

Image Zoom incompatibility

in
Subscribe to Image Zoom incompatibility 4 posts, 2 voices



freibooter User

This script could be the mother of all anti-annoying-imagehost scripts if it weren't for a few annoying problems.

The most severe is that it breaks the fantastic Image Zoom extension ( https://addons.mozilla.org/en-US/firefox/addon/139 ) on the images it "frees". Manual Zoom via Image Zoom is sadly impossible. That's kind of a dealbreaker :-(

I also would prefer if the script would simply "free" the image like the "View Image" context menu entry, but I'm wondering if that's even possible (especially without breaking some image hosts).

 
Thomas Rosenau Script's Author
I also would prefer if the script would simply "free" the image like the "View Image" context menu entry

Yes, that's possible. However, this will push the image's URL on the history stack, which is exactly what I want to avoid.

To achieve this, simply edit the script and replace the line

showImage(foundImage.src);

by

location.href = foundImage.src;

 
freibooter User

Thanks for the quick reply Thomas. I already experimented with that earlier and it sadly has the additional problem that it doesn't work for quite a few imagehosts either, for example:
http://www.imagebam.com/image/4870e31130974/
The upside is that ImageZoom works fine whenever this does work.
Therefore ImageZoom compatibility would be nice, almost all changes to element-styles the script makes are !important ... which doesn't seem really necessary for quite a few of them. Maybe that's what breaks ImageZoom, but I'm just guessing here.

 
Thomas Rosenau Script's Author
it doesn't work for quite a few imagehosts either

Looks like imagebam.com transfers their images with the content-disposition HTTP header set to 'attachment;...', which simply tells the browser to save the file to disk immediately. Sorry, there's nothing I can do about this.

almost all changes to element-styles the script makes are !important

This is necessary to overwrite the web page's CSS definitions. No other way to do it.

Maybe that's what breaks ImageZoom

Nope, I just found out that it's a bug in ImageZoom: Images that have their width and/or height properties explicitly set to 'auto' are not being zoomed, even though 'auto' is the default value. You can verify this with the following simple test case

<!DOCTYPE html>
<html><title>Test</title>
    <img src="https://addons.mozilla.org/en-US/firefox/images/t/3536/943948800" />
    <img src="https://addons.mozilla.org/en-US/firefox/images/t/3536/943948800" style="width: auto;" />
</html>
Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel