-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix: CMM 754 bug when loading bog images in high res #22211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: CMM 754 bug when loading bog images in high res #22211
Conversation
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses a bug where high-resolution images fail to load properly in the Reader photo viewer due to timeout exceptions. The fix implements a fallback mechanism that retries loading with lower resolution when timeouts occur.
- Adds a 5-second timeout to image loading requests
- Implements fallback loading with 50% resolution when high-res images fail
- Reduces initial high-resolution width calculation to 80% of screen size
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
ImageManager.kt | Adds timeout configuration and imports timeout utilities |
ReaderPhotoView.java | Implements fallback image loading mechanism with lower resolution retry |
ReaderPhotoViewerFragment.java | Reduces high-resolution image width to prevent oversized requests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WordPress/src/main/java/org/wordpress/android/ui/reader/views/ReaderPhotoView.java
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/reader/views/ReaderPhotoView.java
Outdated
Show resolved
Hide resolved
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr22211-ab1be7f | |
Commit | ab1be7f | |
Direct Download | wordpress-prototype-build-pr22211-ab1be7f.apk |
…ttps://github.com/wordpress-mobile/WordPress-Android into fix/CMM-754-bug-when-loading-bog-images-in-high-res
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr22211-ab1be7f | |
Commit | ab1be7f | |
Direct Download | jetpack-prototype-build-pr22211-ab1be7f.apk |
@jkmassel I've now added the original image URL, and it seems to be working fine. So, it confirms that there's some kind of issue loading the redimensioned version. Who should I speak with to raise a flag here? I've also added tracking for it. |
Update note: I tried to set the already loaded image as the placeholder for the fullscreen view, so the transition would be smoother while loading the highRes. But unfortunately, I realised that the reader is a webview, so there's no way to improve the UX from the client side by following that path. So, definitely server improvement will benefit the experience. |
|
Closing in favor of: #22235 |
Pull request was closed
Description
When loading a specific post with high-res images, some of them are not loaded properly, and they look blurry.
It turned out the problem was on the image itself, so Volley is throwing a Timeout Exception. In this PR I've added a new mechanism to retry loading the image with a lower resolution. The problem is that it takes some time to detect the timeout and reload. And increasing the timeout will just cause more UX problems I guess...
Something feels off with the image as it's not especially a heavy one. These are the two URLS:
https://[BLURRED].wordpress.com/wp-content/uploads/2025/09/frame-3.png?w=1920
https://[BLURRED].wordpress.com/wp-content/uploads/2025/09/frame-4.png?w=1920
One is loading in less than 100ms, and the other one is throwing a TimeoutException after 7secs...
Testing instructions
(Video in the Slack thread because of internal info)