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

Deal with expiration of user images #64

Open
pjotrsavitski opened this issue Sep 14, 2016 · 1 comment
Open

Deal with expiration of user images #64

pjotrsavitski opened this issue Sep 14, 2016 · 1 comment

Comments

@pjotrsavitski
Copy link
Member

pjotrsavitski commented Sep 14, 2016

screen shot 2016-09-14 at 12 39 20
screen shot 2016-09-14 at 12 39 34

The current issue is with Facebook profile image on CDN that expires after some time (most probably along with the token).

StackOverflow thread: http://stackoverflow.com/questions/34580136/facebook-app-login-how-to-control-expiration-date-of-an-image-url-i-got

The sane solution seems to be to fetch the user image and serve that locally (should probably work well enough). Later on user would be able to pick and upload any suitable image instead.

Another one would be to deal with problematic images, replacing those with some default ones. This explains how it could be achieved: http://stackoverflow.com/questions/92720/jquery-javascript-to-replace-broken-images
Using some kind of special replacement image that would clearly send a signal of what happend might be a good idea.

In case of Facebook, a new CDN image could be requested (provided that needed data is available).

@pjotrsavitski
Copy link
Member Author

pjotrsavitski commented Sep 20, 2016

One more possibility is to store user images locally when user logs in through the social network. This way image will be served by our own endpoint (with permission checks applied).

This is probably the way to go. Later on user will be able to upload some other profile image if required.

pjotrsavitski added a commit that referenced this issue Mar 13, 2017
This is a nasty one and should be replaced by something better (store
images locally).
pjotrsavitski added a commit that referenced this issue Mar 13, 2017
pjotrsavitski added a commit that referenced this issue Mar 13, 2017
This solution still leaves administration view broken, but that is using
the lean() approach and does not get objects but just certain data.
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

1 participant