Limit image size to 1024*1024 for b2g.

Temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=876906