Comments (15)
Hello there!
The feature is done in v1.4.0
: https://strapi-community.github.io/strapi-plugin-local-image-sharp/guide/#configuration
Also, the new documentation is online! Feedback is welcome!
from strapi-plugin-local-image-sharp.
Yes. Set a cache rule on your server.
from strapi-plugin-local-image-sharp.
Yes. Set a cache rule on your server.
Could you give an example please?
from strapi-plugin-local-image-sharp.
Ngnix:
https://linuxhint.com/cache-static-resources-https-nginx/
Apache:
https://www.faqforge.com/linux/enable-image-caching-in-apache-for-better-google-page-speed-results/
from strapi-plugin-local-image-sharp.
If your using something like next.js and next/image, there is some cache settings to be set there:
In next.config.js you can set the images cache duration. If you have no cache on the server, and haven't set minimumCacheTTL, then you images will get thrown away as soon as they have been generated.
https://nextjs.org/docs/api-reference/next/image#caching-behavior
from strapi-plugin-local-image-sharp.
do i understand this right, the caching is happening on the client side for the front end? If that's the case, seems a bit odd, that it's not being cached at backend..
from strapi-plugin-local-image-sharp.
Oh sorry, mixed together this issue with a next/image thread I'm getting a lot of updates on. Edited.
from strapi-plugin-local-image-sharp.
But I would recommending using a cache layer in front of this plugin. Wouldn't not expect that's in the scope of this plugin, it has just a single purpose, to generate an images based on the parameters I send to it. See it like a microservice. Cause caching all depends on the rest of the setup in your project. If your using something like Gatsby or Next.js, it will be build into the framework.
from strapi-plugin-local-image-sharp.
it has just a single purpose, to generate an images based on the parameters I send to it
The generated image is not saved in the filesystem, am I right?
Thanks
from strapi-plugin-local-image-sharp.
You can now set maxAge
properly in the plugin setting.
Before v1.2.0
this setting were not used by ipx, it was fixed on unjs/ipx#71 so browser cache should now work as expected!
About server side caching, for now images are not stored anywhere.
We can extend https://github.com/strapi-community/strapi-plugin-rest-cache to allow caching assets?
from strapi-plugin-local-image-sharp.
please extend serverside caching of images
from strapi-plugin-local-image-sharp.
+1 is this something planned in the future?
from strapi-plugin-local-image-sharp.
You can now set
maxAge
properly in the plugin setting.
Beforev1.2.0
this setting were not used by ipx, it was fixed on unjs/ipx#71 so browser cache should now work as expected!About server side caching, for now images are not stored anywhere.
We can extend https://github.com/strapi-community/strapi-plugin-rest-cache to allow caching assets?
Any progress on this? I really want this to become a reality) how can I help?
from strapi-plugin-local-image-sharp.
I do not have too much time to work on this at now, sorry!
If someone could open a PR I will take time to review/publish, that would be appreciated.
from strapi-plugin-local-image-sharp.
How do you manage when you change the image? because the reiszed images are cached and not change. How can i flush that specific image cache?
from strapi-plugin-local-image-sharp.
Related Issues (20)
- Missing public folder HOT 1
- It doesn't work with Google Cloud Storage Provider HOT 1
- 1.2.1 breaks usage of path modifiers HOT 2
- AVIF support HOT 2
- [BUG]: IPX error when trying to access any media HOT 1
- [Performance] Cache-Control in HTTP response header
- Presets and Strict Mode for prevent potential image-resize attacks HOT 1
- How to use sharpen parameter?
- 500 with median modifier
- Providing default plugin configuration does not work HOT 1
- [Feature Request] Auto Format by Request Header HOT 1
- heifsave_buffer not found while running in Docker HOT 1
- Add latest LTS support.
- Strapi Cloud support?
- Any plans to get this working with node 20.x? HOT 4
- breaks the video HOT 1
- strapi v4.3.0.beta2 HOT 1
- Question: can it transform the image to webp on image upload? HOT 2
- Question: how would this work if I use AWS S3 provider? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi-plugin-local-image-sharp.