You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if there would a cache folder where the already compressed images are in so they won't need a new compression. It takes long to do the images on my website currently so deployment is slower.
Hey @NikolaRHristov Thanks again for opening that PR against FusionAuth!
I know you are trying to pull back from this project, but did you have thoughts on how this would work? I might hack on this and make a PR if you haven't gotten very far.
Yeah, no problem! I've been thinking about using the internal git cache of a repository and simply outputting a folder with already processed files. Then just calling that folder to see if something's cached or not. The simplest of things.
sequenceDiagram
participant User
participant AstroCompress
participant Cache
participant FilesPipe
participant Git
User->>AstroCompress: Input Files
loop Check Cache
AstroCompress->>Cache: Check if cached
Cache-->>AstroCompress: Cache status
end
alt Cache Found
AstroCompress->>Cache: Retrieve from Cache
Cache-->>AstroCompress: Cached Files
else Cache Not Found
AstroCompress->>FilesPipe: Process Files
FilesPipe-->>AstroCompress: Processed Files
AstroCompress->>Cache: Store in Cache
Cache-->>AstroCompress: Cache Stored
AstroCompress->>Git: Commit Processed Files
Git-->>AstroCompress: Commit ID
end
Git->>User: Commit ID
alt Processed Files Changed
AstroCompress->>Cache: Replace Cached Files
Cache-->>AstroCompress: Replacement Done
end
AstroCompress->>User: Output Files
Loading
That way you can stage that folder in git and have those files persisted, so every time AstroCompress is executed on the CI or somewhere it can have something to work with.
Do we have any intent on tackling on this.
This integration is amazing, but +7 minutes on everybuild on a small landing page seems too much of a hit for long term usage
Activity
NikolaRHristov commentedon Nov 4, 2022
@RichardLindhout I have thought about that! 😁 But that would require some harder thinking.
NikolaRHristov commentedon Nov 4, 2022
But expect it in
1.2.0NikolaRHristov commentedon Nov 4, 2022
I noticed the slow build times on https://github.com/nikolaxhristov/astro.build.compress.critters, as well and also some errors ough
RichardLindhout commentedon Jul 20, 2023
@NikolaRHristov does this work now, would be really cool!
NikolaRHristov commentedon Jul 20, 2023
Hey @RichardLindhout, still not I'm afraid 😅 That's why
astro-compressis still version 1.1.x 🤣NikolaRHristov commentedon Jul 20, 2023
I have some time over the weekend so I'll give it a crack.
RichardLindhout commentedon Jul 20, 2023
Wow that would be so great!!
lyleschemmerling commentedon Aug 15, 2023
Hey @NikolaRHristov Thanks again for opening that PR against FusionAuth!
I know you are trying to pull back from this project, but did you have thoughts on how this would work? I might hack on this and make a PR if you haven't gotten very far.
NikolaRHristov commentedon Aug 15, 2023
Yeah, no problem! I've been thinking about using the internal
gitcache of a repository and simply outputting a folder with already processed files. Then just calling that folder to see if something's cached or not. The simplest of things.sequenceDiagram participant User participant AstroCompress participant Cache participant FilesPipe participant Git User->>AstroCompress: Input Files loop Check Cache AstroCompress->>Cache: Check if cached Cache-->>AstroCompress: Cache status end alt Cache Found AstroCompress->>Cache: Retrieve from Cache Cache-->>AstroCompress: Cached Files else Cache Not Found AstroCompress->>FilesPipe: Process Files FilesPipe-->>AstroCompress: Processed Files AstroCompress->>Cache: Store in Cache Cache-->>AstroCompress: Cache Stored AstroCompress->>Git: Commit Processed Files Git-->>AstroCompress: Commit ID end Git->>User: Commit ID alt Processed Files Changed AstroCompress->>Cache: Replace Cached Files Cache-->>AstroCompress: Replacement Done end AstroCompress->>User: Output FilesThat way you can stage that folder in
gitand have those files persisted, so every time AstroCompress is executed on the CI or somewhere it can have something to work with.NikolaRHristov commentedon Aug 15, 2023
This would ideally be implemented in
FilesPipe- https://github.com/NikolaRHristov/FilesPipeNikolaRHristov commentedon Aug 15, 2023
This is very well still in its ideation stage and PRs are welcome.
azat-io commentedon Feb 9, 2024
Thank you, I love your package.
Really looking forward to the caching feature.
NikolaRHristov commentedon Feb 10, 2024
🙏🏻 Yeah, same, this is a hard feature.
jgabriel98 commentedon Dec 8, 2025
Do we have any intent on tackling on this.
This integration is amazing, but +7 minutes on everybuild on a small landing page seems too much of a hit for long term usage
jgabriel98 commentedon Dec 12, 2025
Hey guys, @wlami made a cached alternative to PlayForm Compress, but it had bugs and the project got abandoned.
So i decided to fork it, fix it, and maitaint it myself.
You guys can check it out here:
https://github.com/jgabriel98/astro-compress
Feel free to open issues and report bugs!