
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
react-native-transformable-image
Advanced tools
A transformable image component, as the known **PhotoView** or **ImageViewer**, supports gestures like pan, pinch, double tab and fling, is written in **pure JavaScript**, supports **both iOS and Android**.
A transformable image component, as the known PhotoView or ImageViewer, supports gestures like pan, pinch, double tab and fling, is written in pure JavaScript, supports both iOS and Android.
npm install --save react-native-transformable-image@latest
Quite same as the official Image, as below shows:
import Image from 'react-native-transformable-image';
...
render() {
return (
...
<Image
style={{width: width, height: height}}
source={{uri: 'https://raw.githubusercontent.com/yoaicom/resources/master/images/game_of_thrones_1.jpg'}}
//pixels={{width: 3607, height: 2400}}
/>
...
);
}
The pixels prop is used to align the edge of the image content with the view's boundry and to determine the max scale. This prop is optional if the image is remote (like source={{uri: 'http://remoteurl'}}
) and you are using react-native 0.28 and above.(This component will use Image.getSize to get pixels info both on iOS and Android since release v0.28-rc when no pixels prop provided.
If your image is local (like source={require('...')}
) or you are using react-native v0.27 and below, you should provide the pixels prop, wraping the image's width and height.(You can ask your API server to provide image pixels info)
FAQs
A pure JavaScript written transformable image component, like PhotoView or ImageViewer, supports gestures like pan, pinch, double tab and fling, works with both iOS and Android.
The npm package react-native-transformable-image receives a total of 11 weekly downloads. As such, react-native-transformable-image popularity was classified as not popular.
We found that react-native-transformable-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.