Dear Leila,
I don’t see the need for your points 1 and 3. This seems unnecessarily complicated to me.
If I understand you correctly, you have put the images that you need to use in multiple apps into the _static/global directory of your project.
Moreover, you seem to have a folder/app called newapp. Assuming that you are using the “no-self” variant of oTree, there is a file __init__.py in that folder. You also seem to have a file _Template.html in that folder.
With this setup, you should have something like the lines
class _Template(Page):
@staticmethod
def vars_for_template(player):
image_path = 'global/1.jpg',
}
in the file newapp/__init__.py. This is what you seem to do. (Of course, in your case image_path is created dynamically based on certain conditions.)
Then, all you should need in _Template.html is
<img src="{{ static image_path }}" />
(as you suggested). That’s all.
Best,
Holger