Use whitelist on image resizing

We only resize jpegs, but PNGs pass through the blacklist of "gif".
This fixes that.