Fit Images

By Stilgar Last update Sep 14, 2009 — Installed 6,728 times.


Script Summary: Fits big images to the inner window size.

Version: 3.1


This script shrinks images that are not in the window of the browser would fit, so they are completely visible. So you don't have to scroll to see the full image.
Very useful example for Image galleries or forums.
* Pictures at a smaller height then 250px, will not be reduced (e.g. menus, banners ...)
* As a tooltip is displayed the title and the original size of the image.
* With a click on the picture, it appaers in original size in a new window.
* Resized images are marked with a border.
Versions:
  • V3.1
    + Changed: Doesn't resize imagemaps anymore.
  • V3.0
    + Added: Now it works if the content of the page is changed, too (e.g. AJAX, AutoPager)
  • V2.3
    + Changed: Border color is now the same like the link-color
  • V2.2
    + Changed: Now only pictures with "Height and Width> 250px" are fitted. You can disable it in the menu.
    + Changed border from 2px to 0.25em
  • V2.1
    + now every resized picture is marked with a small green border (var BorderStyle). You can disable it via the menu.
  • V2.0
    + now with Auto-mode (menu) to fit all images if you resize the browser window. The maximum picture size is the original size.
  • V1.40
    + added menu to change between "All" or "Height > 250px" images
  • V1.35
    + removed the leading "/" in the tooltip if there is no title
    + changed "pixels" to "px"
  • V1.3
    + now only pictures with a height > 250px are resized
    * some optimizations
  • V1.0
    initial release, Based on the script "Resize inline images in forums"