unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.
MIT License
1.2k stars 59 forks source link

add rounded edges modifier #187

Open tasiotas opened 8 months ago

tasiotas commented 8 months ago

Describe the feature

Could you please add rounded edges modifier so we can specify radius and output rounded/circular images?

Found few examples of implementation in Sharp, unfortunately its beyond me to contribute this feature.

https://github.com/lovell/sharp#stream https://github.com/lovell/sharp/issues/2268#issuecomment-684814762 https://github.com/lovell/sharp/issues/3467#issuecomment-1325008545

thank you

Additional information

DesertCookie commented 1 month ago

I would love to se this added too. It'd be a lot easier than messing around with HTML rounded corners for images that have object-fit: container.