https://commons.wikimedia.org/wiki/File:Winterville_Aerial_View_HRoe_2016.jpg does not thumbnail, doesn't have extracted metadata, has reported zero width/height.
|mediawiki/core : master||JpegMetadataExtractor: Don't fail when garbage bytes are present between JPEG sections|
The file contains lots of garbage null bytes between JPEG sections. This technically makes it an invalid JPEG file, but it seems that the normal behavior of all tools that handle JPEG files is to just ignore these bytes, or possibly display a warning; we shouldn't be failing on them.
The patch above fixes out metadata extractor, but the same bug is present in PHP's function getimagesize(), which we also use. I think we'd have to fix it somewhere around here… https://github.com/php/php-src/blob/c8fe175c508e635ccf04b5c90913e1933e60280f/ext/standard/image.c#L475
Thumbnail generation is only failing because we can't extract the metadata (in particular, the width/height from getimagesize()).
(Note that a new version of the file was uploaded without the issue, you can still see the old one in file history.)
A nice surprise, this is already fixed in PHP 5.6.26:
I guess I just need to port that fix to HHVM.
Oh, 3.12.11 was just released 5 days ago, and it's indeed there (https://github.com/facebook/hhvm/commits/HHVM-3.12.11). So I guess it's a question for Moritz now, when are we planning to upgrade?
Thank you @MoritzMuehlenhoff, I can confirm that the original versions of the two problematic files now thumbnail correctly and have the right metadata shown. I have restored them both. For any other currently affected files, this will be resolved after we do T32961: Run refreshImageMetadata.php --force.