Question
nginx: compressing images of a Node.js website
Hi,
I’ve recently rebuilt a former WP site with Node.js using MongoDB and Express.
Now I’m struggling to adhere to PageSpeed Insights. Despite the fact that I’m using a proxy, nginx’s gzip compression works well by simply enabling it in my {server}
block. Images, on the other hand, are cached by Express using .static()
but now Google asks me to compress images. I’ve googled a lot and also ran an exhaustive search on npm but it doesn’t seem to be an answer out there. Where should I work? nginx? Express? Both?
Thanks in advance.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×