yarn add -D babel-plugin-react-native-image-source-to-base64
or
npm install --save-dev babel-plugin-react-native-image-source-to-base64
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [['react-native-image-source-to-base64', {limit: 2 * 1024}]],
};