next-optimized-images
next-optimized-images copied to clipboard
Optimizing images coming from firebase
I have a requirement of using this package to optimize and resize gifs in a website. Basically i want to provide the url of the image to the require function and make it work, when i try to do this i get a error saying module not found. #120 I just happened see the version 3 is on the way, i just want to do a quick reminder to the team that if this is possible, i believe there are alternatives like cloudinary and imgix, probably way more than that but currently i cannot afford them!. Help this poor guy! @cyrilwanner
So, you would like to pull images from a source URL instead from a local source? I'm having actually the same requirement. @cyrilwanner the canary version seems to have support for it, but it's not yet documented. Could you help us out with a little hint, so we can try it out?
It is a planned feature but not yet included in the canary version. But I'll definitely include that feature. I'll inform you once the feature can be tested in the canary version.
perfect! Thanks man :)
@cyrilwanner any updates on this feature???
I found this: https://github.com/wbunting/with-image-preprocessing let me know if it can be usefulI
@ild0tt0re will let you know!! thanks for the find.
We are using now caravaggio: https://link.medium.com/1fPSRDUzQ9 Works like a charm!
@JannikZed how is this different from fastly and cloudinary. Like am having gifs in my firebase. Will this hook fetched the gif from firebase and populate it once the webpage is loaded?
you will create a new API route and all gifs in your project get their URL replaced with your new API route. That means, that the requested gif is not directly coming from firebase, but from your API route, that is requesting then the file from firebase, optimizing it to a size and quality measure of your choice and sends it back to the client. The second time the file gets requested it is already for example in the vercel CDN. It is just a on-the-fly image optimization.