Migrating from astro-compress
astro-compresshas been republished!
astro-compress has been deprecated & deleted by the author. Here’s a quick overview of what you can do to migrate to newer solutions for optimisation.
Image optimisation can now be achieved natively using
astro:assets. Images are placed anywhere in the
src/ directory (e.g.
src/assets/), and can be imported and used in your
Enable Assets (pre-3.0)
astro:assets currently sits behind an experimental flag. To enable it, modify your Astro config to enable the flag.
Copy your existing images to
src/assets/, or another convenient directory. Then, you can import them and use them in your markup.
Check out the full assets guide for more info & configuration.
Astro now supports minifying HTML automatically, using the
compressHTML option in
An alternative “one-click” solution is Jampack. Similar to
astro-compress, but framework agnostic, Jampack performs compression on your
If you’re using an Astro theme that ships with
astro-compress by default, consider sending the author a quick PR to help future users. Even if it’s as simple as removing the integration, this will fix their template, and it can continue to serve the community.