According to https://hexdocs.pm/phoenix/Mix.Tasks.Phoenix.Digest.html
The output folder will contain:
- the original file
- a compressed file with gzip
- a file containing the original file name and its digest
- a compressed file containing the file name and its digest
- a manifest file
I see my images in priv/static/manifest.json, but they are not compressed in priv/static.
Debug messages while running Phoenix servers in prod always say they’re getting the content from the
priv directory so I guess they’re not using compressed images if there aren’t any that dir, but I’m not 100% sure.
So we should manually compress images and configure nginx to use it?
Compression of images using gzip shouldn’t really be worthwhile. Instead you should look into optimizing them with tools like jpegoptim or optipng.
Hm… It is an idea!
Thanks for other side opinion!