Enhance base64 embedded image support function.