1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Compress the secureImg. TinyMce also decoding theme SEF image URLs now.

This commit is contained in:
Cameron
2016-02-07 11:16:00 -08:00
parent 831ef22ad9
commit 2976754d29
3 changed files with 16 additions and 3 deletions

View File

@@ -94,7 +94,7 @@
ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month"
</IfModule> </IfModule>
### Gzip Compression Module ### Gzip Compression Module
<ifmodule mod_deflate.c> <ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml text/xml application/rss+xml AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml text/xml application/rss+xml
</ifmodule> </ifmodule>

View File

@@ -391,10 +391,10 @@ class secure_image
switch($type) switch($type)
{ {
case "jpeg": case "jpeg":
imagejpeg($image); imagejpeg($image, null, 60 );
break; break;
case "png": case "png":
imagepng($image); imagepng($image, null, 9);
break; break;
case "gif": case "gif":
imagegif($image); imagegif($image);

View File

@@ -249,6 +249,19 @@ TEMPL;
$hKey => $match[4] $hKey => $match[4]
); );
} }
elseif(preg_match('/theme\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)/', $url, $match)) // Theme-image SEF Urls
{
$wKey = $match[1].'w';
$hKey = $match[3].'h';
$ret = array(
'src'=> 'e_THEME/'.$match[5],
$wKey => $match[2],
$hKey => $match[4]
);
}
return $ret; return $ret;
} }