Fixes gif images from being resized. Fixes #557.