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

Optimizing images coming from firebase #166

Open
Jagadesh-Ram opened this issue Jun 26, 2020 · 9 comments
Open

Optimizing images coming from firebase #166

Jagadesh-Ram opened this issue Jun 26, 2020 · 9 comments

Comments

@Jagadesh-Ram
Copy link

Jagadesh-Ram commented Jun 26, 2020

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

@JannikZed
Copy link

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?

@cyrilwanner
Copy link
Owner

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.

@JannikZed
Copy link

perfect! Thanks man :)

@Jagadesh-Ram
Copy link
Author

@cyrilwanner any updates on this feature???

@ild0tt0re
Copy link

I found this:
https://github.com/wbunting/with-image-preprocessing
let me know if it can be usefulI

@Jagadesh-Ram
Copy link
Author

@ild0tt0re will let you know!! thanks for the find.

@JannikZed
Copy link

We are using now caravaggio: https://link.medium.com/1fPSRDUzQ9
Works like a charm!

@Jagadesh-Ram
Copy link
Author

@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?

@JannikZed
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants