How to upload and load an image to myobject

Hello, i’ve been trying to develop my own module and i’ve encountered a big problem which is that i dont know how to assign an image to it and show it on the card.php file.

What i currently do is Upload the image with an input type file which is saved on both the database and on a folder called documents/assets.

The problem here is, that i dont know how to get that image from my folder using the native function that i see a lot of other modules use (Like societe, user, etc.) which is img_object.

Basically, what im trying to do is load the image from the folder and show it in the card.php dol_banner_tab section.

Thanks for your help!

Pièces jointes :

Hello! I dunno if you could solve it. But, if u didn’t I made it like this:

Just go to myobject.class.php file:

in the variable public $picto = fa-file change the value to myobject@myobject

You have to already have a file myobject.png in your img folder