aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-12-07 20:14:17 +0100
committerMario <mario@mariovavti.com>2019-12-07 20:14:17 +0100
commitaed682305173a67b2af1a56b8595445bec690e2b (patch)
treea022f3769332331a9c30f4b96a81a6b854690767 /boot.php
parent96f9e515466b749d1e1640aad3fd25bc19399f1a (diff)
downloadvolse-hubzilla-aed682305173a67b2af1a56b8595445bec690e2b.tar.gz
volse-hubzilla-aed682305173a67b2af1a56b8595445bec690e2b.tar.bz2
volse-hubzilla-aed682305173a67b2af1a56b8595445bec690e2b.zip
Add .webp image format support
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index bc1e2a319..c98ab007d 100755
--- a/boot.php
+++ b/boot.php
@@ -105,6 +105,11 @@ define ( 'JPEG_QUALITY', 100 );
define ( 'PNG_QUALITY', 8 );
/**
+ * App::$config['system']['webp_quality'] from 1 (maximum compressed) to 100 (uncompressed)
+ */
+define ( 'WEBP_QUALITY', 80 );
+
+/**
* Language detection parameters
*/
define ( 'LANGUAGE_DETECT_MIN_LENGTH', 128 );
@@ -899,11 +904,12 @@ class App {
// Serve raw files from the file system in certain cases.
$filext = pathinfo(self::$cmd, PATHINFO_EXTENSION);
- $serve_rawfiles=[
+ $serve_rawfiles = [
'jpg'=>'image/jpeg',
'jpeg'=>'image/jpeg',
'gif'=>'image/gif',
'png'=>'image/png',
+ 'webp'=>'image/webp',
'ico'=>'image/vnd.microsoft.icon',
'css'=>'text/css',
'js'=>'text/javascript',
@@ -913,7 +919,8 @@ class App {
'ttf'=>'font/ttf',
'woff'=>'font/woff',
'woff2'=>'font/woff2',
- 'svg'=>'image/svg+xml'];
+ 'svg'=>'image/svg+xml'
+ ];
if (array_key_exists($filext, $serve_rawfiles) && file_exists(self::$cmd)) {
$staticfilecwd = getcwd();