Looking to give my images rounded corners, but struggling with Bootstrap 4 responsive images (With the class img-fluid
). Using border-radius=15px
isn't ideal as it distorts the corners on small viewports and large images.
Tried border-radius=15%;
, but non-square images end up with elliptical corners. Adjusting with border-radius=15%/10%;
helps, but requires custom ratios for each image's aspect ratio.
Want to achieve consistently circular rounded corners for all images, regardless of aspect ratio in Bootstrap 4. Prefer a CSS-only solution over Javascript for simplicity given limited number of aspect ratios.