how to crop image in css to take a given size code example Example: how to crop images in css img{ object-fit: cover; }