You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the time if the image is loaded once, it will be in the cache, and subsequent fetch for the same image URI will hit the cache. However, this implementation
indicate that if the initial state of the image will always be IDLE even if the image is loaded before.
Solution
We will modify the ImageLoader.has logic to be able to check reliably if the image is in the cache. It works both when the image URI is previously loaded by <img tag or by the Image component in react-native-web
letglobalImageToCheckCache=newwindow.Image()ImageLoader.has=(uri)=>{globalImageToCheckCache.src=uri;letisInCache=globalImageToCheckCache.completeglobalImageToCheckCache.src=''// unassign to avoid firing extra requestreturnisInCache}
The text was updated successfully, but these errors were encountered:
Is there an existing request?
Describe the feature request
Problem
Original issue: Expensify/App#45853
Most of the time if the image is loaded once, it will be in the cache, and subsequent fetch for the same image URI will hit the cache. However, this implementation
react-native-web/packages/react-native-web/src/exports/Image/index.js
Lines 203 to 212 in 54c14d6
indicate that if the initial state of the image will always be
IDLE
even if the image is loaded before.Solution
We will modify the
ImageLoader.has
logic to be able to check reliably if the image is in the cache. It works both when the image URI is previously loaded by<img
tag or by theImage
component inreact-native-web
The text was updated successfully, but these errors were encountered: