Here's a way to do it. First we'll use this as our `DockedCell` expression:

    newDockedCell =
      Cell[
       BoxData@ToBoxes@
         Pane[
          Import["https://i.imgur.com/LUIaEdC.png"],
          ImageSize ->
           {
            FEPrivate`Part[
             FrontEnd`AbsoluteCurrentValue[FrontEnd`EvaluationNotebook[], 
              WindowSize],
             1],
            Automatic
            },
          ImageSizeAction -> "ShrinkToFit",
          Alignment -> Center
          ]
       ];

Then just add these style edits to the stylesheet however you like. This is my preferred short-hand (using custom package-level functions), but the easiest thing is just to do it manually as you have done:

    StyleSheetEdit[
     "Notebook",
     DockedCells ->
      newDockedCell,
     "MakeCell" -> True
     ]
    
    StyleSheetEdit[
     "DockedCell",
     {
      CellFrameMargins -> 0,
      Background -> White
      },
     "MakeCell" -> True
     ]

The key here is this:

    FEPrivate`Part[
     FrontEnd`AbsoluteCurrentValue[FrontEnd`EvaluationNotebook[], 
      WindowSize],
     1]

That will be computed by the front-end directly and give the notebook width.

By setting these:

    ImageSizeAction -> "ShrinkToFit",
    Alignment -> Center

The [`Pane`](http://reference.wolfram.com/language/ref/Pane.html) will force the content to be centered and take on that size and shrink if constrained.

You can see from these that it works:

[![small][1]][1]

[![medium][3]][3]

[![large][2]][2]

### Getting this into the stylesheet:

This can be a little annoying to add to the stylesheet, so here's an effective way to do this:

- Go to the stylesheet
- Find the style `CellObject` for `"Notebook"`. This can be most easily gotten via `PreviousCell` or `NextCell`.
- Run this:
<p></p>

    SetOptions[thatCell, DockedCells->newDockedCell]



- Select that cell and toggle Show Expression on and off

It should work after that

  [1]: https://i.sstatic.net/yzS18.png
  [2]: https://i.sstatic.net/27G0C.png
  [3]: https://i.sstatic.net/hSrWv.png