What's happening?
Hi! First of all, thank you for such an amazing library!
On iOS, it seems like:
- SVG format is not auto-detected (I need to supply
format="svg" in order for the image to display);
- The rendering is vastly different from other implementations (web,
react-native-svg);
resizeMode seems to have no effect — the image is not scaled to fit the container, even if <svg> tag doesn't have width and height attributes.
My SVG image is very simple — it contains only 2 paths. No filters/gradients/masks etc.
No format prop |
format="svg" |
 |
 |
Reproduceable Code
import { Text } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { SvgUri } from 'react-native-svg';
import TurboImage from 'react-native-turbo-image';
const URI =
'https://images.ctfassets.net/zhgoh1a85x2k/3P07taNJiznsHQPzDGAwZv/6ce82ca823046bd051803c991ebd6ffd/Adyen_Visa.svg';
const STYLE = { width: 128, height: 128, backgroundColor: 'lightgrey' };
const App = () => (
<SafeAreaView style={{ gap: 16 }}>
<Text>TurboImage</Text>
<TurboImage
style={STYLE}
resizeMode='contain'
source={{ uri: URI }}
format='svg'
/>
<Text>SvgUri from react-native-svg</Text>
<SvgUri style={STYLE} uri={URI} />
</SafeAreaView>
);
export default App;
Relevant log output
Device
iOS simulator (iOS 17.5)
TurboImage Version
1.21.0
Can you reproduce this issue in the TurboImage Example app?
Yes, I can reproduce the same issue in the Example app
What's happening?
Hi! First of all, thank you for such an amazing library!
On iOS, it seems like:
format="svg"in order for the image to display);react-native-svg);resizeModeseems to have no effect — the image is not scaled to fit the container, even if<svg>tag doesn't havewidthandheightattributes.My SVG image is very simple — it contains only 2
paths. No filters/gradients/masks etc.formatpropformat="svg"Reproduceable Code
Relevant log output
Didn't see any logsDevice
iOS simulator (iOS 17.5)
TurboImage Version
1.21.0
Can you reproduce this issue in the TurboImage Example app?
Yes, I can reproduce the same issue in the Example app