Initialize an Image object from a local file

This will be used for the implementation of #3438.