
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
react-native-cached-imageview
Advanced tools
android: api 21+
ios : 10.0+
Image is a wrapper around Guiso (iOS) and Glide (Android).
$ npm install react-native-cached-imageview --save
$ react-native link react-native-cached-imageview
or
$ yarn add react-native-cached-imageview
Add Swift
/ios/name_project
add a .swift file
import { Controller, CachedImage ,DrawableImage } from 'react-native-cached-imageview'
//(Android) DrawableImage not support Gif - useful for shared elements.
const source = {
uri: 'https://unsplash.it/200/200?image=1',
width: 400,
height: 400,
}
const clearMemory = () =>{
Controller.clearMemoryCache()
}
<Image source={source} />
source?: objectSource for the remote image to load.
source.uri?: stringuri to load the image from. e.g.
https://facebook.github.io/react/img/logo_og.png.
static image ("static;${uri}")
base64String ("base64,${value}")
uri --> ("value")
source.asGif?: booleanif the image you load is an animated GIF, Image will display a animated gif. Default Value -> false
source.headers?: Object key:string Headers to load the image with. e.g. { Authorization: 'someAuthToken' }.
source.priority?: stringlow
normal -> Default
high
Priorities for completing loads. If more than one load is queued at a time, the load with the higher priority will end first. Priorities are considered best effort, there are no guarantees about the order in which loads will start or finish.
source.placeholder?: stringonly accept static image ("static;${uri}") and base64String ("base64,${value}")
Default value -> null
Image that is shown while a request is in progress. When a request completes successfully, the placeholder is replaced with the requested resource. If the requested resource is loaded from memory, the placeholder may never be shown. If the request fails , the placeholder will continue to be displayed.
source.width?: numberThe width to be used in the resize, -1 ignore resize.
Default value -> -1
source.height?: numberThe height to be used in the resize, -1 ignore resize.
Default value -> -1
source.resizeMode?: stringDetermines how to resize the image:
cover: Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).
contain(Default): Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
source.skipMemoryCache?: booleanDefault value -> false
Allows the loaded resource to skip the memory cache.
Note - this is not a guarantee. If a request is already pending for this resource and that request is not also skipping the memory cache, the resource will be cached in memory.
source.diskCacheStrategy?: stringDefault value -> "automatic"
automatic
none
all
data
resource
scaleType?: stringControls how the image should be displayed.
Default value -> "contain"
cover
contain
onLoadStart?: () => voidCalled when the image starts to load.
onLoadSuccess?: (event) => voidCalled on a successful image fetch. Called with the width and height of the loaded image.
e.g. onLoadSuccess={e => console.log(e.nativeEvent.width, e.nativeEvent.height)}
onLoadError?: (event) => voidCalled on an image fetching error.
e.g. onLoadError={e => console.log(e.nativeEvent.error)}
onLoadEnd?: () => voidCalled when the image finishes loading, whether it was successful or an error.
Promise
import { Controller } from 'react-native-cached-imageview'
Controller.clearMemoryCache()
Promise
import { Controller } from 'react-native-cached-imageview'
let compressFormat = "jpeg" | "png"
let quality = 0.9 // 0 to 1
Controller.requestImage(imageRef,compressFormat,quality).then( string64 => {
console.log("result ",string64)
})
Cancellation
import { Controller } from 'react-native-cached-imageview'
Controller.clearImage(imageRef)
callback
import { Controller } from 'react-native-cached-imageview'
Controller.get( {
uri: 'https://unsplash.it/200/200?image=1',
width: 400,
height: 400,
}, (result)=>{
if(result.error != null){
return
}
console.log("image string ",result.image)
})
FAQs
Cahed Image Android IOS
We found that react-native-cached-imageview 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.