ambassify / react-avatar

Universal avatar makes it possible to fetch/generate an avatar based on the information you have about that user.
MIT License
643 stars 117 forks source link

Feature Request: Support Cloudinary CDN #209

Open theMasix opened 4 years ago

theMasix commented 4 years ago

Hello. I use this package for my entire avatar serving in React. Today, I got acquainted with Cloudinary CDN. I wonder if we could have cloudinray-specific support: Give the image name and image config to the package, then the package make the correct image url and serve it. I think it would be useful. I know the Cloudinary has its own React SDK. So what we might do is only merge the SDK with this package.

JorgenEvens commented 4 years ago

Hi @theMasix,

I'm hesitant to include this in react-avatar core because of the dependency on the javascript library of Cloudinary.

I see three options to move forward with Cloudinary support in react-avatar.

Would it be possible for you to let me know which would / wouldn't fit your use-case?

theMasix commented 4 years ago

I finally came up with the first solution. I use javascript SDK and build the URL. then pass it to the react-avatar as src prop. Your second solutions looks good. I love it too. But the third one is not my favorite solution. It's kind of a putting the cart before the horse I think...