Only add handlers on image thumbnails

None of this PDF handler business.

Whitelist may be a little incomplete, but I think it comprises most of
the images on Commons at least. We can revisit later.

Change-Id: I33a44f8de8b0e93818f7cc950d8cae11bd73b929
Merge "Only add handlers on image thumbnails"