.loader {
  height: 4px;
  top: 4px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #ddd;
}

.loader::before {
  display: block;
  position: absolute;
  content: '';
  left: -200px;
  width: 200px;
  height: 4px;
  background-color: red;
  animation: loading 2s linear infinite;
}

.center {
  display: flex;
  justify-content: center;
}

@keyframes loading {
  from {
    left: -200px;
    width: 30%;
  }

  50% {
    width: 30%;
  }

  70% {
    width: 70%;
  }

  80% {
    left: 50%;
  }

  95% {
    left: 120%;
  }

  to {
    left: 100%;
  }
}

.loader {
  height: 4px;
  top: 4px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #ddd;
}

.image {
  object-fit: contain;
}

.loader::before {
  display: block;
  position: absolute;
  content: '';
  left: -200px;
  width: 200px;
  height: 4px;
  background-color: red;
  animation: loading 2s linear infinite;
}

.center {
  display: flex;
  justify-content: center;
}

@keyframes loading {
  from {
    left: -200px;
    width: 30%;
  }

  50% {
    width: 30%;
  }

  70% {
    width: 70%;
  }

  80% {
    left: 50%;
  }

  95% {
    left: 120%;
  }

  to {
    left: 100%;
  }
}

Fix image rendering on mobile in editor
Fix image rendering on mobile in editor

Use 'contain' in order to not stretch images more than needed
on mobile
