Possible to use sprite mesh for UI.Image GraphicRaycaster culling?

I’d like to use a generated sprite mesh as part of the IsRaycastLocationValid culling for UI Images on a Canvas. After looking through the UI source code, it doesn’t appear that the sprite mesh is respected in any way by the Image class - it seems to only be used for 2D game stuff, not for UI.

Are there any helper scripts that have been created to check the sprite mesh against the raycast location, so you can cull input events that are within the Image rect but outside the sprite mesh?

Steve Streeting wrote a component which you can use on your image game object to check if you are inside the custom outline of the sprite. But be careful: You should check the positions of the triangles, if you use a perspective camera.