how to make sure img does not loose the ration css code example Example: css keep image ratio img { object-fit: cover; width: 100px; height:100px; }