I would like to transform an image only with css, in this way :
- Scale down image to 35px*35px
- Crop it to remove unwanted borders (by 20%)
- Add a css solid border
I've managed to make something that kind of work but it seems to be an overkill, is there any simple and elegant solution ?
<div style="border: 1px solid rgb(163,53,238); width:25px;height: 25px;"><img src="https://i.stack.imgur.com/vTp2a.png" width=42 height=42 style="clip-path: polygon(20% 20%,80% 20%,80% 80%,20% 80%);margin:-8.4px"></div>
edit: Input image will always be squarish