CSSだけで画像を切り抜き
<div class="base">
<div class="bg">
<img src="https://cdn.pixabay.com/photo/2020/04/10/16/19/landscape-5026558_960_720.jpg">
</div>
</div>
.base {
width: 100vw;
height: 100vh;
background-color: #FED700;
position: relative;
}
.bg {
background-color: #D900FF;
width: 300px;
height: 200px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
img {
width: 100%;
height: 100%;
object-fit: cover;
clip-path: polygon(0 20%,100% 0,100% 80%,0 100%);
}