mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 07:36:32 +02:00
Added compression to generated PNG thumbnails. Additional module configurations added to e107.htaccess
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<IfModule mod_env.c>
|
<IfModule mod_env.c>
|
||||||
SetEnv HTTP_MOD_REWRITE On
|
SetEnv HTTP_MOD_REWRITE On
|
||||||
SetEnv HTTP_MOD_REWRITE_MEDIA Off
|
SetEnv HTTP_MOD_REWRITE_MEDIA On
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
### enable rewrites
|
### enable rewrites
|
||||||
@@ -78,5 +78,27 @@
|
|||||||
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
### Mod_Expires Settings (when available)
|
||||||
|
### May be modified if required
|
||||||
|
<IfModule mod_expires.c>
|
||||||
|
ExpiresActive On
|
||||||
|
ExpiresDefault "access plus 2 hours"
|
||||||
|
ExpiresByType image/x-icon "access plus 1 year”
|
||||||
|
ExpiresByType image/gif "access plus 1 week"
|
||||||
|
ExpiresByType image/png "access plus 1 week"
|
||||||
|
ExpiresByType image/jpg "access plus 1 week"
|
||||||
|
ExpiresByType image/jpeg "access plus 1 week"
|
||||||
|
ExpiresByType text/css "access plus 1 month"
|
||||||
|
ExpiresByType application/javascript "access plus 1 month"
|
||||||
|
ExpiresByType text/javascript "access plus 1 month"
|
||||||
|
ExpiresByType text/x-javascript "access plus 1 month"
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
### Gzip Compression Module
|
||||||
|
<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
|
||||||
|
</ifmodule>
|
||||||
|
|
||||||
|
|
||||||
### Enable when developing locally.
|
### Enable when developing locally.
|
||||||
### SetEnv E_DEV true
|
### SetEnv E_DEV true
|
||||||
|
@@ -986,7 +986,7 @@ class GdThumb extends ThumbBase
|
|||||||
{
|
{
|
||||||
header('Content-type: image/png');
|
header('Content-type: image/png');
|
||||||
}
|
}
|
||||||
imagepng($this->oldImage);
|
imagepng($this->oldImage, null, 9); // modified by e107
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1073,7 +1073,7 @@ class GdThumb extends ThumbBase
|
|||||||
imagejpeg($this->oldImage, $fileName, $this->options['jpegQuality']);
|
imagejpeg($this->oldImage, $fileName, $this->options['jpegQuality']);
|
||||||
break;
|
break;
|
||||||
case 'PNG':
|
case 'PNG':
|
||||||
imagepng($this->oldImage, $fileName);
|
imagepng($this->oldImage, $fileName, 9); // modified by e107
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user