-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: caching of generated images #661
Conversation
🦋 Changeset detectedLatest commit: b0b152f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #661 +/- ##
==========================================
+ Coverage 94.17% 95.47% +1.30%
==========================================
Files 33 33
Lines 1235 1283 +48
Branches 206 224 +18
==========================================
+ Hits 1163 1225 +62
+ Misses 72 58 -14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c20f342
to
a60bd47
Compare
Are there any other issues with this other than the conflicts that need to be resolved? I have tested it locally and it is working well for me. |
I was hoping to get caching support in Vite first, but I don't think that's going to happen soon enough, so I plan to get this PR in. I won't be able to look at it for the next week, but hopefully after that. |
@pzerelles heads up that this PR needs a rebase |
17282a0
to
94738e1
Compare
Awesome PR, I was looking for a way to cache my pictures. Pipeline takes 30 minutes because I have many images. |
This one has a merge conflict I think from merging your other PR. Can you update it? Thanks! |
Wow I would love to see this merged ! |
Is this stable enouth to be use in dev ? I have almost 20min of build time on Vercel (almost 40 image to be optimize by imagetools) ... this is a nightmare for development. I'm really thinking to stop using imagetools because of that ? |
I've been using it in dev and production for half a year already. |
How did you specify pnpm/npm/yarn to fetch this branch ? |
I use a personal build created from my forked repository. But I hope this will be merged really soon. We are working on it. |
It looks to me like if a user changes the way in which they want an image to be transformed that those changes won't get picked up because we prefer the cache. I think we may be able to remove the need for an |
I see your point with the user changes. I need to include the config somewhere... The main purpose of the |
I refactored the whole PR to use the ID from |
@pzerelles while using this, i have found that it is possible for 0 byte files to be stored in the cache directory if a build is cancelled while generating images. I sent a PR to resolve this issue pzerelles#1 |
Yayyy, will this be release soon ? How can I update in the meantime ? |
Yes, it will be released before too long. It will be available when #707 is merged. You can subscribe to that PR for updates |
Humm I don't know why but it's seems to not work with 7.0, and
In the I'm using Sveltekit with a bunch of `?enhanced' imports. The |
You'll need to wait for sveltejs/kit#12055 for |
Closes #522
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the new behavior (if this is a feature change)?
Generated images can be cached to skip transformation of unchanged images.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this
PR?)
No
Other information: