How to change the size of item-avatar in ionic?
In Ionic v4 you only need to specify the max's.
ion-avatar {
max-width: 25px;
max-height: 25px;
}
With ionic 3 I found the other answers to not work when I put them into my page's SCSS file, this instead worked for me, and is a mild modification of Vairav's answer.
ion-avatar img {
width:100% !important;
height : 100% !important;
max-width: 100px !important; //any size
max-height: 100px !important; //any size
}
The item avatar has a default max-width and max-height property. You can find it in the ionic.css file. You can either change it over there or in your CSS just add:
.item-avatar {
width:100% !important;
height : 100% !important;
max-width: 100px !important; //any size
max-height: 100px !important; //any size
}
Best solution I found for Ionic 4 :
ion-avatar {
width: 100px;
height: 100px;
}