File tree 1 file changed +22
-1
lines changed
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -726,7 +726,7 @@ installed the following PHP extensions or CLI commands:
726
726
727
727
* Brotli: ``brotli `` CLI command; `brotli PHP extension `_;
728
728
* Zstandard: ``zstd `` CLI command; `zstd PHP extension `_;
729
- * gzip: ``gzip `` CLI command; `zlib PHP extension `_.
729
+ * gzip: ``zopfli `` (better) or `` gzip `` CLI command; `zlib PHP extension `_.
730
730
731
731
Then, update your AssetMapper configuration to define which compression to use
732
732
and which file extensions should be compressed:
@@ -751,6 +751,27 @@ compressed files are created with the same name as the original but with the
751
751
precompression will use the compressed assets automatically, so there's nothing
752
752
else to configure in your server.
753
753
754
+ Finally, you need to configure your web server to serve the precompressed assets
755
+ instead of the original ones:
756
+
757
+ .. configuration-block ::
758
+
759
+ .. code-block :: caddy
760
+
761
+ file_server {
762
+ precompressed br zstd gzip
763
+ }
764
+
765
+ .. code-block :: nginx
766
+
767
+ gzip_static on;
768
+
769
+ # Requires https://github.com/google/ngx_brotli
770
+ brotli_static on;
771
+
772
+ # Requires https://github.com/tokers/zstd-nginx-module
773
+ zstd_static on;
774
+
754
775
.. tip ::
755
776
756
777
AssetMapper provides an ``assets:compress `` CLI command and a service called
You can’t perform that action at this time.
0 commit comments