Skip to content
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

Cache images generated by ipx locally #1245

Closed
MickL opened this issue Feb 11, 2024 · 5 comments
Closed

Cache images generated by ipx locally #1245

MickL opened this issue Feb 11, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@MickL
Copy link

MickL commented Feb 11, 2024

It seems like locally ipx is regenerating all images every time the website reloaded. Is it possible to cache the generated images?

  • I have 20 images on one page, they come from AWS S3 and take 3-8s every time I reload the page
  • This also produces unnecessary traffic to my the file storage

In contrast: Deployed to Vercel images are cached

@manniL manniL added the enhancement New feature or request label Feb 16, 2024
@BananaAcid
Copy link

BananaAcid commented Feb 19, 2024

Same problem, different case: a 22mb file ist generated on the fly each time, taking 5secs to load … having the generated files locally cached, would be a dream.

In the meantime, we added nginx in front of any Nuxt project just for caching images -

@vonec
Copy link

vonec commented Mar 4, 2024

may be some flag to force regeneration would be useful, it can check if image exists and move on

@Aareksio
Copy link
Contributor

Aareksio commented Mar 5, 2024

I'd slap "out of scope" on this feature request. Caching is difficult, especially as scale increases. A basic cache layer could be added as opt-in via middleware. However, adding external layer on top of your nuxt app should be a better solution for deployment (CDN - cloudflare, vercel; cache as proxy - eg. nginx).

Linking #795 as it seems related, there are comments there about caching ipx results in not only SSG but also SSR.

@MickL
Copy link
Author

MickL commented Mar 5, 2024

An external layer is not an option. This issue is solely about adding caching for local development.

@MickL
Copy link
Author

MickL commented Mar 5, 2024

Closing this as a duplicate of #795

@MickL MickL closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants