Convert image reference to png