[SOLVED] Help with using utilities:avatar package

Can anyone help with utilities:avatar? here are my settings

Avatar.setOptions({
fallbackType: “initials”,
customImageProperty: ‘profile.profilePic’,
imageSizes : {
small : 35,
large : 100
}
});

my html template looks like this:
{{#with profileData}}




Name:


    </div>
    <!-- /.col-lg-7 -->
    <div class="col-lg-5">
      <div class="well well-lg">
        {{> avatar user=this shape="circle"}}
        <hr>
        <div>
        <input class='fileInput' type="file" id="file">
      </div>
      <hr>
      <button type="button" class="js-af-remove-file">Remove image</button>

      </div>

    </div>
    <!-- /.col-lg-5 -->
  </div>
  {{/with}}

and my template event looks like this

Template.user_profile.events = {
‘change .fileInput’: function () {
// var file = $(’#file’).get(0).files[0];
// fsFile = new FS.File(file);
// fsFile.metadata = {owner:Meteor.userId()}
// var fileObj = Images.insert(fsFile);
var file = $(’#file’).val();
// console.log('Upload result: ', fileObj);
//todo create meteor method call to update league with image (pass in fileObj).
Meteor.call(‘updateProfileImage’, file, function(error, success){

  if(success){
    console.log('profile image update was successful');
  }
  if(error){
    console.log("profile image fail to update")
  }
});

}
};

What is the best way to do this, should I be saving the url string from the input value or i’m missing another step?

I guess I’m on my own.

I hope someone could help you! I am also stuck with avatar stuff, trying to make the avatar dinamically change (a coloured border) depending on an option chosen by the user.

I have solved setting backgroundcolor associated to a function:

https://raw.githubusercontent.com/fricolab/slowfashionnext-events/master/packages/custom/lib/custom_avatar.js

I finally figured out what I needed to do to get this to work for me. Super excited :smile: