I am trying to clip my image with an SVG path but my image doesn't seem to fit in well.
This is what I am trying to achieve:
And this is what i am getting:
This is the code I've tried:
.topbar-chat-img {
width: 48px;
height: 48px;
object-fit: cover;
clip-path: url(#topbar-img-svg);
}
<img src="https://picsum.photos/200/200?image=1069" class="topbar-chat-img" />
<svg>
<defs>
<clipPath id="topbar-img-svg">
<path class="svg-cls" d="M33,66A33.009,33.009,0,0,1,20.155,2.593,32.99,32.99,0,0,1,66,33a32.691,32.691,0,0,1-3.271,14.341,11.008,11.008,0,0,0-13.148,14.2A32.978,32.978,0,0,1,33,66Z"/>
</clipPath>
</defs>
</svg>
See Question&Answers more detail:os