Add support for parsing image refs