Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Provide a default avatar URL if the user hasn't uploaded one? #295

Closed
rfk opened this issue Dec 20, 2017 · 3 comments
Closed

Provide a default avatar URL if the user hasn't uploaded one? #295

rfk opened this issue Dec 20, 2017 · 3 comments
Assignees

Comments

@rfk
Copy link
Contributor

rfk commented Dec 20, 2017

From discussion in mozilla-lockwise/lockbox-extension#417

We have a nice "placeholder" avatar image that we use in our UI when the user hasn't uploaded a custom image. For consistency it would be nice for reliers to be able to use the same image.

For users who have not set an avatar image, should we just return the URL of the placeholder image as part of the user's profile data?

@rfk rfk added this to the FxA-141: lockbox beta milestone Dec 20, 2017
@pdehaan
Copy link
Contributor

pdehaan commented Dec 20, 2017

Q: Should it return the URL to the default avatar image, or inline as a data-uri in the response?

Pro: One less network request.
Con: Inlined response is much larger.

@Arteneko
Copy link

Returning an URL would require the client to make another request to fetch said avatar, but the client could also choose to not request the image. In the opposite case, in which the client would grab the user's avatar, if not the default, he'd still require it, so I'd say it'd be expected behaviour.

Having links in both situations would keep one concise response type: HTTP(s) URL to an image resource.

Also, if any client would want to not load the icon but provide a locally-stored version, they still could just check the URL against the def. avatar's link (or a list of default avatar's links).

For me, it'd be a yes.

@vladikoff
Copy link
Contributor

from mtg: let's do it! Let's make it a URL to the placeholder

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

No branches or pull requests

4 participants