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

Generate default profile avatar locally if it is supported. #943

Closed
wants to merge 6 commits into from

Conversation

ravibpatel
Copy link
Contributor

Rather than using a third party service to generate the avatar, it is better if we generate the avatar locally. That way it can load faster, and we can still fallback to third party service if it is not possible to generate it due to lack of gd or imagick PHP extension.

@driesvints
Copy link
Member

Can you show some comparison screenshots?

@ravibpatel
Copy link
Contributor Author

Sure, here it is. Difference in initials comes due to fix in #940. As we are generating avatar locally, we can use full name instead of initials. It is also possible to publish the config file of Intervention and change driver to imagick if gd is not available. By default, it uses gd to generate it. If any of the dependency is unavailable, it will fall back to the original method of getting the avatar.

Before

Before

After

After

@taylorotwell
Copy link
Member

Feel free to change this in your own code if you wish.

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

Successfully merging this pull request may close these issues.

3 participants