I'm trying to crop an image when building a notification received by the server. At this moment I only have the image url.
Here's what I've tried:
Coil.load(context, remoteMessage.getImageUrl()) {
target { image ->
transformations(CircleCropTransformation())
val person = Person.Builder()
.setName(remoteMessage.getTitle())
.setIcon(IconCompat.createWithBitmap(image.toBitmap()))
.build()
...
It loads the image but doesn't crop it.