Here is one way of creating a content warning over an image, using the slider block.
- Insert a slider block
- Un-toggle the show tabs option in the block settings.
- Click add slide to insert the first slide
- Add your content warning text into this slide.
- In the block settings, add a slide title (for reference) and select the ‘transparent’ background style.
- Click add slide to insert the second slide
- Add a slide title (for reference).
- Select hide content in the slide settings.
- Click set image and choose an image from the media library.