I am not able to use neither HDMI nor the peripherals. So to solve this problem I would need the img to already have the wifi configuration to connect automatically. Is it possible?
Yes, you can. Put you micro sdcard in some reader(USB or some internal), mount and edit the orangeEnv.txt under /boot. There you can set WiFi/Ethernet devices, password for AP and some other stuff