I'm loading Landsat tiles into a Mapbox GL JS map via an AWS S3 tile server, and this is working OK, but what I'd really like to do is clip the tile layer to a GeoJSON polygon which is loaded in another layer. By this I mean instead of showing the whole image, which in this case covers a huge area, it would just show the part of the image that lies within the boundaries of the GeoJSON polygon - in this case an area of approx 2.5ha. Note that I'm working with irregular polygons too rather than just rectangular bounding boxes.
My first thought was that I might be able to achieve this by somehow setting the raster layer in a fill parameter for the GeoJSON layer, but that doesn't seem to be possible. Then I thought maybe the GeoJSON layer could be given as a 'mask' or 'clip' parameter when loading the raster layer, but there doesn't seem to be any support for this either.