IONIC Increasing Image Size


Hi guys,i’m having problems with the size of an image.
my image is 24X24 but the ionic is increasing its size.

I’m using this code :
<img src="assets/imgs/star.png" style="background: transparent !important;" item-start/>

But ionic display :

when i need it :

Thanks !



img tag has height and width property. Use it, when you need specific dimensions.

Best regards, anna-liebt.


Hello ! Thanks for the fast response !
I tried it and the result is the same.

<img width="24" height="24" src="assets/imgs/star.png" style="background: transparent !important;" item-start/>


Why not use:

      <button ion-button color="primary" clear small icon-start>
        <ion-icon name='star'></ion-icon>





it’s worked,thanks !
but if i want another icons that i couldn’t find on the ionic docs ?
how i will resolve this problem ?




Wow I didn’t know this website.
It will resolve my problem. Thanks!!!



fine that a other solution works for you.

Bytheway sometimes it is for me necessary to stop ionic serve and start it again that changes on code are updated. Because If you give the image a specific height and width and nothing else overwrite it, it should displayed with our values.

Best regards, anna-liebt.