Got it fixed! I added this in the CSS
@media screen and (max-width: 450px) {
.has-header-image .custom-header-media img,
.has-header-video .custom-header-media video,
.has-header-video .custom-header-media iframe,
.has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media img {
height: auto;
left: 0;
max-width: 100%;
min-height: 0;
-o-object-fit: unset;
object-fit: unset;
position: relative;
-ms-transform: none;
-moz-transform: none;
-webkit-transform: none;
transform: none;
}
}
.custom-header,
.has-header-image.twentyseventeen-front-page .custom-header {
height: 870px;
}
@media only screen and (max-width:768px) {
.custom-header,
.has-header-image.twentyseventeen-front-page .custom-header {
height: 400px;
}
}
@media only screen and (max-width:480px) {
.custom-header,
.has-header-image.twentyseventeen-front-page .custom-header {
height: 200px;
}
}
.custom-header-media:before {
display: none;
}