for versioning
* Maintenance scripts get a --memory-limit option to override defaults (which
is usually to set it to -1 to disable the limit)
+* (bug 25397) Allow uploading (not displaying) of WebP images, disabled by default
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive
// Formats we recognize magic numbers for
'djvu', 'ogx', 'ogg', 'ogv', 'oga', 'spx',
'mid', 'pdf', 'wmf', 'xcf', 'webm', 'mkv', 'mka',
+ 'webp',
// XML formats we sure hope we recognize reliably
'svg',
return "unknown/unknown";
}
+ /* Look for WebP */
+ if( strncmp( $head, "RIFF", 4 ) == 0 && strncmp( substr( $head, 8, 8), "WEBPVP8 ", 8 ) == 0 ) {
+ wfDebug( __METHOD__ . ": recognized file as image/webp\n" );
+ return "image/webp";
+ }
+
/*
* Look for PHP. Check for this before HTML/XML... Warning: this is a
* heuristic, and won't match a file with a lot of non-PHP before. It
image/x-bmp image/x-ms-bmp image/bmp application/x-bmp application/bmp [BITMAP]
image/x-photoshop image/psd image/x-psd image/photoshop [BITMAP]
image/vnd.djvu image/x.djvu image/x-djvu [BITMAP]
+image/webp [BITMAP]
image/svg+xml application/svg+xml application/svg image/svg [DRAWING]
application/postscript [DRAWING]