Currently the app shows the blurhash while waiting for the background image to load. The background image returned from the API is the urls.regular image from Unsplash, which has a width of 1080px only. This is not good for higher-resolution displays.
On the other hand, loading the urls.full image from Unsplash will also takes very long, as each image could take up to 3-5MB each.
Proposed Solution
Return both urls.regular and urls.full images
Keep current behavior of loading urls.regular by default
After urls.regular has loaded, load urls.full in the background. The result should be cached by the browser so it loads faster in future page loads
Keep a flag in the settings storage that determines if we should display urls.regular or urls.full, depending on whether urls.full has been loaded previously or not
If the user is in data saver mode, just stick with urls.regular and don't try to load urls.full
If background image settings is just a preview, no need to load urls.full
Currently the app shows the blurhash while waiting for the background image to load. The background image returned from the API is the
urls.regular
image from Unsplash, which has a width of 1080px only. This is not good for higher-resolution displays.On the other hand, loading the
urls.full
image from Unsplash will also takes very long, as each image could take up to 3-5MB each.Proposed Solution
urls.regular
andurls.full
imagesurls.regular
by defaulturls.regular
has loaded, loadurls.full
in the background. The result should be cached by the browser so it loads faster in future page loadsurls.regular
orurls.full
, depending on whetherurls.full
has been loaded previously or noturls.regular
and don't try to loadurls.full
urls.full