The main approach today is adding a rounded-corner mask to the image on the client’s side, using either CSS or image mask overlays.
There's another approach - add rounded corners to the original image and serve it to the browser in its final form. This approach offers some very nice benefits.
While the client-side masking approach usually works, it certainly has its drawbacks:
Supporting older browsers is non-trivial and the HTML can get cluttered. In addition, this method fails when generating PDFs or sending emails. Email clients today simply do not support advanced CSS techniques. Client-side masking is non-trivial for mobile applications where it’s more complex to transform the images or add masks on the device itself.