Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@assetcrush/react-native-sdk
Advanced tools
A simple react native library to resize image on fly
A simple react-native library to resize image on fly.
assetcrush is an image resize service for on the fly dynamic resize. If your users are uploading images of various sizes and then you are consuming those images on different devices then this service is ideal for your use. Since every device has different dimensions our sdk will make sure to get the rightly resized image for you via assetcrush resize service.
https://assetcrush.com/en/docs/getting-started
npm i @assetcrush/react-native-sdk --save
or with yarn
yarn add @assetcrush/react-native-sdk
import React from "react";
import { StyleSheet } from "react-native";
import { ImageCrush, setKey } from '@assetcrush/react-native-sdk';
// replace test-key with your assetcrush key
setKey("test-key");
export default function App() {
return (
<ImageCrush
source={{
uri: "https://cdn.pixabay.com/photo/2021/12/11/07/59/hotel-6862159__340.jpg"
}}
style={styles.image}
/>
);
}
const styles = StyleSheet.create({
image: { width: 300, height: 300 },
});
Prop | Type | Required | Note |
---|---|---|---|
source | object | yes | source object should contain uri |
style | object | no | style object |
spinnerIcon | element | no | Custom Reactative element for loading |
reloadIcon | element | no | Custom Reactative element for retry |
spinnerColor | string | no | Custom color for loading |
hideSpinner | bool | no | Show or hide loading |
onError | func | no | If image fails to load |
onLoad | func | no | When image loads successfully |
acEnv | string | no | Envoirment of the compoent |
Any additional props are passed down to underlying <Image />
element.
git clone https://github.com/assetcrush/react-native-sdk.git
cd react-native-sdk/example
yarn install # or npm install
# to run with npm
npm start
# to run with yarn
yarn start
Create an issue with github.
FAQs
A simple react native library to resize image on fly
We found that @assetcrush/react-native-sdk 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.