When uploading an image into a template and saving it, the template is saved without the image.
Thinking about how an image would move from this cached location to a permanent location, The server side would need to know about these images so I expect that there is a mechanism that registers these images so that when the template is saved, these pictures would be moved and their references updated at the same time. My thought is that this mechanism (if it exists) is not working correctly. The template editor allows for the source code to be viewed and changed. I expected that updating the source code might trigger the aforementioned image register mechanism and so just viewing or pasting in the source code verbatim would be enough. It turned out that I may be either correct or on the right path of thought as viewing the source code and faking updating it is enough to get the uploaded pictures into the long term storage location.
I have not verified my thoughts and still do not fully understand the implementation of the template editor and all the above is best guess.