Fix EZP-19929: embedding images in ezoe generates PHP warning

Backport of : 52aaf84aeffa92c01a6688aa4adb80b23af461ad