Perzonalize layout

Hello, I am developing an application without the use of any template engine and I need to show in the layout images that are going to be uploaded by the User, as I can do so that they are displayed (I have the uploader of the images) And others, I just need a function that can be called from the layout or something like that).

As I understand the variable "$ content" shows all the content that is displayed by each view, but what I want to add, will be present in all views of the project and I do not want to repeat code. I look forward to your help.

Either add it to layout or create a decorating layout to apply to views. All that is described well in the guide: http://www.yiiframework.com/doc-2.0/guide-structure-views.html