How to control the picture without distortion by css

Mini Program"s requirement is to make the data of the img passed by the background undistorted, but the design gives the effect of 70 times 70. the size of the img passed in the background may be 100x200,80,120and so on. Is there any solution that can solve the problem that the pictures that pass through are not deformed? in the corresponding 70mm 70 container, or how to cut only the avatar part is OK. I tried the properties in the mode of image, but all of them are not satisfactory. If you have done it, please give me some advice. Thank you.


the current solution is to define widthFix in the mode property of image to keep the aspect ratio of the original image unchanged, and then nest a tag on the outside given width and height to add overflow: hidden; so that the upper part


can be displayed.
  

first of all, I would like to say that there is no restriction when you upload a picture. No matter how you change it, there will always be another part of the picture that will look inconsistent.
but I write the picture to judge the aspect ratio of the picture, and then press the smaller 100%, the other auto.
I upload a picture of 1000px*1px, what to do, right? so finally emphasize a game, let them follow the rules when uploading pictures, otherwise how can any pictures not be deformed? You write the code yourself and give them a rule,

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e95851-155e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e95851-155e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?