ionic comes with a lot of own components like ion-header, ion-footer, ion-button, ion-img, ion-text etc. and in html we also have many tags like p, span, div, b, img ,ul, li, figure etc.
here are some Difference Between Img And Ion-Img Tag
-
imgis a standard HTML element- The
ion-imgis a component that is similar to the standard element, but it also adds features in order to provide improved performance. - if there are only a few images to be rendered on a page, then the standard tag is the best choice.
- if a page has the potential for hundreds or even thousands of images within a scrollable area, then would be better suited for the job.
- each
ion-imguses theobject-fit: coverCSS property. What this means is that the actual rendered image will center itself within it’s container. - add
ion-img-cacheattribute toimgtag you want to cache.