Download the image template prior to checking its size.

Change-Id: I07aa6eef0e08baad8c3068b3546dfcf11da98ae2
Fixes: bug #1183606