Update the initializeImageRegistry to be compliant with E3 and E4.