use on-load event to trigger resizable images

instead of timeout, which could get incorrect size information.

closes #5219
Merge pull request #5223 from minrk/tiny-images

use on-load event to trigger resizable images