Image with object-fit and object-position
Thanks for the awesome library.
New to this library and finding it hard to make this library work with image where object-fit and object-position is used. I have a case where container's aspect ratio is different than image's intrinsic aspect ratio. So I need to set following properties on image
object-fit: cover; object-position: center; overflow: hidden;
Hello @zatakiya
In that case, you can use the img-mapper-img class name or you can use imgProps.style ( https://github.com/img-mapper/react-img-mapper/blob/master/src/ImageMapper.tsx#L310-L314 )
Check doc: https://github.com/img-mapper/react-img-mapper?tab=readme-ov-file#properties ( imgProps )
Since there’s been no response from the OP for the past two months, I’m closing this issue due to lack of discussion from the OP side.