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
Version Number: 9.4.53-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#97313 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Android 16 / Samsung Galaxy A06 App Component: Money Requests
Action Performed:
Prerequisite: have large receipt images
Open Expensify app
Open the expense with large receipt image from Spend tab
Observe the receipt image
Expected Result:
Original image is shown after the loading is done
Actual Result:
Low-res image is still shown after the loading is done
TL;DR:PR #97313 switched the expanded receipt's primary image from the server-resized thumbnail to the full-size original. On Android the large original can fail to finish decoding, and because of how the two loading states are wired, the low-res preview is never removed — so you keep seeing the low-res image even though "loading" has visibly finished.
What is the root cause of that problem?
There are two independent loading states, and after PR #97313 the outer one is satisfied by the preview while the inner one waits on the original:
Outer state — MoneyRequestReceiptView owns isLoading, which drives the loading skeleton (showBorderlessLoading) and is cleared by the onLoad/onLoadFailure it passes down (MoneyRequestReceiptView.tsx:697-698).
Inner state — ImageWithLoading owns its own isLoading, which gates the semi-transparent low-res preview overlay. This inner state is cleared only when the always-mounted main <Image source={original}> fires onLoad or onError (ImageWithLoading.tsx:108-132 → imageLoadedSuccessfully → setIsLoading(false)).
The preview <Image>'s onLoad is wired straight to the parent passthrough, not to the inner setIsLoading(false) (ImageWithLoading.tsx:100-102). So the sequence for a large receipt is:
The small low-res preview decodes quickly → fires parent onLoad → outer skeleton disappears ("loading done").
The large original never completes decode on Android (nor errors) → inner setIsLoading(false) never runs → the semi-transparent low-res preview stays mounted indefinitely.
Before PR #97313 the main image was itself the server-resized thumbnail, so it always decoded and cleared its own loading state; the original was only fetched lazily for hover-zoom. Moving the full original into the always-rendered main image is what exposes Android's large-bitmap decode limit.
One decisive step is unverified: whether Android/expo-image fires neitheronLoad nor onError for the oversized original (a silent stall). The reported symptom (low-res persists rather than going blank) matches "neither fires", but this should be confirmed on-device before implementing.
The preview only shows while inner isLoading is true, so the fact that it persists proves isLoading is stuck true — i.e. the main original started (onLoadStart fired) but never completed. If onError were firing instead, the preview would unmount and you'd see a blank/fallback, not the low-res image.
No allowDownscaling / maxSourceResolution guard exists anywhere in the Image stack (Image/BaseImage.native.tsx), so the full-resolution bitmap is handed to Glide as-is. Android's per-bitmap texture/memory ceiling (commonly ~4096–8192 px, plus heap) is the likely stall point for "large receipt images".
What changes do you think we should make in order to solve the problem?
The core fix is to stop depending on the full original decoding successfully as the always-rendered image on native, and/or to break the stuck state. Options, roughly in order of preference:
Cap/downscale the native original. Pass a decode resolution cap to the underlying expo-image (e.g. allowDownscaling / maxSourceResolution, or a recyclingKey-safe max dimension) in the Image native wrapper so Android can always decode it. This preserves the "use original" goal for web hover-zoom while keeping native robust.
Guarantee the preview is dismissible. Don't leave the inner isLoading gated solely on the original's onLoad/onError. Add a fallback (timeout, or treat a decoded preview as "good enough" to drop the overlay) so a silently-stalled original can't pin the low-res overlay forever.
Fall back to the thumbnail on native for the expanded view (keep the original-source behavior for web only), since the reported regression is Android-specific.
What alternative solutions did you explore? (Optional)
Reverting the ReportActionItemImage.tsx:194 source swap would fix the regression but reopen #96999 (the hover-zoom quality issue PR #97313 was solving), so it's not preferred.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/98566) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
I mean, it looks absolutely awful, but this does feel pretty edge-casey to me. Curious what the rest of the team thinks, but I'm inclined to not optimize for receipt images like this.
are you fine with this as a consequence of the changes to the lazy load?
This is only on a small screen and is an existing behavior in prod. The lazy load is only implemented for the original image resolution, available on a large screen only.
Activity
applause-bot commentedon Aug 13, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/e95cd8223fc05dd397495a6aacee58fe92b7801b35b6f1ceebd4df935e29f377
https://platform.applause.com/services/links/v1/external/c0e4cd6985b5a2df34117fc487802ae6c39dd7d963455b8fc98374a55ba03356
MelvinBot commentedon Aug 13, 2026
Proposal
TL;DR: PR #97313 switched the expanded receipt's primary image from the server-resized thumbnail to the full-size original. On Android the large original can fail to finish decoding, and because of how the two loading states are wired, the low-res preview is never removed — so you keep seeing the low-res image even though "loading" has visibly finished.
What is the root cause of that problem?
There are two independent loading states, and after PR #97313 the outer one is satisfied by the preview while the inner one waits on the original:
MoneyRequestReceiptViewownsisLoading, which drives the loading skeleton (showBorderlessLoading) and is cleared by theonLoad/onLoadFailureit passes down (MoneyRequestReceiptView.tsx:697-698).ImageWithLoadingowns its ownisLoading, which gates the semi-transparent low-res preview overlay. This inner state is cleared only when the always-mounted main<Image source={original}>firesonLoadoronError(ImageWithLoading.tsx:108-132→imageLoadedSuccessfully→setIsLoading(false)).The preview
<Image>'sonLoadis wired straight to the parent passthrough, not to the innersetIsLoading(false)(ImageWithLoading.tsx:100-102). So the sequence for a large receipt is:fillSpace) ⇒shouldUseThumbnailImage=false⇒source = originalImageSource,previewUri = low-res(ReportActionItemImage.tsx:194, non-thumbnail branchReceiptImage/index.tsx:251-272).onLoad→ outer skeleton disappears ("loading done").setIsLoading(false)never runs → the semi-transparent low-res preview stays mounted indefinitely.Before PR #97313 the main image was itself the server-resized thumbnail, so it always decoded and cleared its own loading state; the original was only fetched lazily for hover-zoom. Moving the full original into the always-rendered main image is what exposes Android's large-bitmap decode limit.
Supporting evidence & verification
isLoading—ImageWithLoading.tsx:94-138.showBorderlessLoading = isLoading && fillSpace—MoneyRequestReceiptView.tsx:544.isLoadingis true, so the fact that it persists provesisLoadingis stuck true — i.e. the main original started (onLoadStartfired) but never completed. IfonErrorwere firing instead, the preview would unmount and you'd see a blank/fallback, not the low-res image.allowDownscaling/maxSourceResolutionguard exists anywhere in theImagestack (Image/BaseImage.native.tsx), so the full-resolution bitmap is handed to Glide as-is. Android's per-bitmap texture/memory ceiling (commonly ~4096–8192 px, plus heap) is the likely stall point for "large receipt images".What changes do you think we should make in order to solve the problem?
The core fix is to stop depending on the full original decoding successfully as the always-rendered image on native, and/or to break the stuck state. Options, roughly in order of preference:
expo-image(e.g.allowDownscaling/maxSourceResolution, or arecyclingKey-safe max dimension) in theImagenative wrapper so Android can always decode it. This preserves the "use original" goal for web hover-zoom while keeping native robust.isLoadinggated solely on the original'sonLoad/onError. Add a fallback (timeout, or treat a decoded preview as "good enough" to drop the overlay) so a silently-stalled original can't pin the low-res overlay forever.What alternative solutions did you explore? (Optional)
Reverting the
ReportActionItemImage.tsx:194source swap would fix the regression but reopen #96999 (the hover-zoom quality issue PR #97313 was solving), so it's not preferred.Possibly related (same PR #97313)
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/98566)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Aug 13, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)melvin-bot commentedon Aug 13, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022087856740591171946
bernhardoj commentedon Aug 13, 2026
My bad. This is expected. The original image is only shown on the wide RHP page (which is only available on a large screen).
mountiny commentedon Aug 13, 2026
cc @Expensify/design are you fine with this as a consequence of the changes to the lazy load?
dannymcclain commentedon Aug 13, 2026
I mean, it looks absolutely awful, but this does feel pretty edge-casey to me. Curious what the rest of the team thinks, but I'm inclined to not optimize for receipt images like this.
shawnborton commentedon Aug 13, 2026
Haha have we ever had a customer upload a receipt like this?! Feels very edge casey so I could live with it.
bernhardoj commentedon Aug 13, 2026
This is only on a small screen and is an existing behavior in prod. The lazy load is only implemented for the original image resolution, available on a large screen only.
trjExpensify commentedon Aug 13, 2026
Big shop at CVS? 😂