File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-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:
726726
727727* Brotli: ``brotli `` CLI command; `brotli PHP extension `_;
728728* 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 `_.
730730
731731Then, update your AssetMapper configuration to define which compression to use
732732and which file extensions should be compressed:
@@ -751,6 +751,29 @@ compressed files are created with the same name as the original but with the
751751precompression will use the compressed assets automatically, so there's nothing
752752else to configure in your server.
753753
754+ Finally, you need to configure your web server to serve the precompressed assets
755+ instead of the original ones.
756+
757+ For example, with FrankenPHP and Caddy, you can use the following:
758+
759+ .. configuration-block ::
760+
761+ .. code-block :: caddy
762+
763+ file_server {
764+ precompressed br zstd gzip
765+ }
766+
767+ .. code-block :: nginx
768+
769+ gzip_static on;
770+
771+ # Requires https://github.com/google/ngx_brotli
772+ brotli_static on;
773+
774+ # Requires https://github.com/tokers/zstd-nginx-module
775+ zstd_static on;
776+
754777 .. tip ::
755778
756779 AssetMapper provides an ``assets:compress `` CLI command and a service called
You can’t perform that action at this time.
0 commit comments