JSFiddle - React, Tailwind, and code Playground

HTML

<div id="myheader"><img src="http://ulrichbangert.de/heimat/Bad_Harzburg_Oldtimertreffen/2014-10-03_Bad_Harzburg_Oldtimertreffen_05_lk.jpg"><br>Oldtimertreffen in Bad Harzburg</div>
    <div id="content">Content</div>

CSS

#myheader {
    position: fixed;
    top: 0px;
    text-align: center;
    border: 2px solid black;
    width: 100%   
}
#content {
    height: 1000px;
    margin-top: 200px;
}

JavaScript

$(document).on("scroll", function () {
    var factor = 1.5;
    var imheight = 133;
    var pos = $(document).scrollTop();
    console.log(pos);
    if (pos < imheight / factor) {
        $("#myheader").css("top", -pos*factor + "px");
    }
});