yii2-usuario icon indicating copy to clipboard operation
yii2-usuario copied to clipboard

Provide user avatar upload feature

Open tonydspaniard opened this issue 8 years ago • 8 comments

  • [ ] Allow multiple upload locations
  • [ ] Provide crop feature

tonydspaniard avatar Jul 10 '17 18:07 tonydspaniard

will integrate with https://github.com/2amigos/yii2-croppie-widget

tonydspaniard avatar Jul 19 '17 22:07 tonydspaniard

When it will be ready?

faenir avatar Sep 07 '17 10:09 faenir

@faenir I am currently working on the Two Factor authentication feature. I believe I will be able to do it after.

tonydspaniard avatar Sep 07 '17 13:09 tonydspaniard

This is going to fill library with js assets and that is something I really do not want. I have to work with the croppie extension itself. Moving this feature to Mileston 1.3.0

tonydspaniard avatar Nov 12 '17 19:11 tonydspaniard

Few suggestions I have is on the image displayed in user profile display views... the user picture (avatar) displayed on the profile page can be rendered using the following rules:

  1. if the user picture has been uploaded by user then this will be displayed
  2. if no user picture has been detected as in STEP 1, then the gravatar image will be displayed
  3. if no gravatar image available as in STEP 2 (e.g. user has not set a valid gravatar email), then a default image as set in Da\User\Module::defaultUserImage should be displayed.
  4. suggest Da\User\Module::defaultUserImage can default to something like:
<span class="glyphicon glyphicon-user" style="font-size:60px"></span>

FINALLY:

An avatar display widget e.g. Da\User\Widgets\AvatarWidget with all the relevant properties, CSS styling options, etc... can also be created using above rules for reuse both by this module as well as the developer

kartik-v avatar Nov 13 '17 08:11 kartik-v

@kartik-v thank you.

The flow is easy to do, the issue I am having is by integrating: https://github.com/2amigos/yii2-croppie-widget so users would be able to see how to work with that library and provide super cool upload avatar features: http://foliotek.github.io/Croppie/

In order to make it work I have to:

  • add a view file for croppie
  • add js file to check whether the FileReader is supported by the browser, initialize uploader + initialize cropper
  • add css file to style dynamics of the view file

So, I rather update croppie widget itself instead of this library. I'll update whenever possible.

tonydspaniard avatar Nov 13 '17 11:11 tonydspaniard

@tonydspaniard i need this option in a nearest project. How far is it? Have you started writing some code or is only a concept?

Eseperio avatar Aug 26 '18 23:08 Eseperio

Any news on this?

Sonit90 avatar Oct 31 '18 00:10 Sonit90