A simple, lightweight plugin to make images fit anywhere and anyway.Finally set the ImageFit in the ‘window load’ event. If you detect visual flips or white margins then try doing it in both, the ‘document ready’ and the ‘window load’ events.