JSFiddle - React, Tailwind, and code Playground

HTML

<div class="wrapper">
  <h4>Before</h4>
  <div class="thumb">
    <img src="https://upload.wikimedia.org/wikipedia/en/9/95/Test_image.jpg" />
  </div>
  <h4>Before ve After</h4>
  <div class="thumb">
    <img src="https://upload.wikimedia.org/wikipedia/en/9/95/Test_image.jpg" />
  </div>
</div>

CSS

.thumb::before{
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #000;
  opacity: 0.8;
}
.thumb:last-child::after{
  content: "";
  width: 50px;
  height: 1px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform:translateX(-50%);
  background-color: #ff0000;
  opacity: 0.8;
}

.thumb{
  position: relative;
  display: inline-block;
}
.thumb img{
  width: 100px;
  height: 100px;
  object-fit: cover;
}