You will need to install a user script manager extension to install this script.
Fit the image preview to the window by default.
It works in a really dumb way - waits a moment and then clicks twice on the image. You might need to adjust the timeout on slow systems or network connections. Possibly you need to have it click a different number of times if your IB account is set to something different for the default view?
Let me know if you have better timing for when to click - ideally I'd wait for some HTML event. Clicking too early in FF makes it think you want to pop open a new window of something.