Understand how FastImage handles image caching
mainFastImage treats image URLs as immutable. This means the library assumes that the content located at a specific URL will never change.
If an image changes (for example, a user updates their profile picture), the backend should provide a new URL for that image. If you attempt to use the same URL for a different image, FastImage will continue to show the old cached version because it believes the content at that URL is unchanged.
Recommended Workflow for Dynamic Images:
- The backend provides a unique URL for the resource (e.g.,
.../user/123/profile_v2.jpg). - FastImage fetches and caches this URL.
- When the resource updates, the backend provides a new URL (e.g.,
.../user/123/profile_v3.jpg). - FastImage treats this as a new request and fetches the updated image.