Finer-grain control over local image caching

We have apps using images as icons for opening different menues and views. Also images in header of some views. Often these images won’t load or it takes too long. A grey triangle then shows.

Woulden’t it be great to have an option for each table or column to save image locally, so one don’t need to wait for the image to load every time, and some times not load at all.
Great for views and icons to be used a lot.

Status Open
5 22 745
22 Comments
LeventK
Silver 5
Silver 5

Loading images are dependent on a couple of requisites actually:

  • Your internet speed
  • The size of the image (w x h in pixels)
  • The filesize of the image (? Kb or Mb of image)
  • Practically png images load faster than jpg

Can you also check below page if it helps you case?
https://community.appsheet.com/search?q=svg

khuslid
Silver 3
Silver 3

Yes. We load 128x png (size 3-4 kb). Approx 50 icons. Still not all of them will load.
There are of couse workarounds. Make table Read only and set switch to Server caching. Or have them in a VC. But not ideal.

Steve
Platinum 4
Platinum 4

3X_d_8_d8e35bb283b706bcaf03a5882f14f29eefeac941.png

khuslid
Silver 3
Silver 3

Thanks @Steve and @LeventK .
Our issue is that the app is big, and most photos we do not need stored locally. Only those used as icons and “buttons”. We have a seperate table for “Menu”.
So at every sync or startup, the icons takes 5-10 seconds to load, and some never show up. (only as grey warnings).3X_2_5_2559cd80d2c8e1d0a9be3bdb054f946eb44e8984.png

khuslid
Silver 3
Silver 3

Also, eg. you have some drawings/floorplans and want to pin deviations on them. It would be great to have the background images (floorplans) to show imeadeatly, not waiting for it to load.
But to have this setting for the whole app is to much. You do not need that for all photos taken by 500 other users in other deviations or projects…

WillowMobileSys
Platinum 1
Platinum 1

I wonder if there might be a way to break the app apart so that the images not needed immediately are housed in a separate app. You can link from app to app - even by view - and in many cases you can’t even tell they are two different apps.

Then you can set your main app to store locally and leave the second app to function as in the current state.

You may need some way to move images captured by the main app into the second app - a script or Report rule, etc.

Austin
Gold 1
Gold 1

You could just point all the apps to look at the same default folder path. Different apps all using the same folder to store images

Fabian_Weller
Gold 1
Gold 1

You can’t use XY Background Images offline, even when you enable “Store content for offline use”.

Fabian_Weller
Gold 1
Gold 1

Hi @LeventK would you prefer PNG instead of JPG? I’m asking especially for XY Background Images. Do you think PNG would load faster?

Adding @Grant_Stead

LeventK
Silver 5
Silver 5

Hello @Fabian,
In one of our discussions, I remember Praveen as well was suggesting use of PNG images rather than JPGs because of the smaller image size and faster rastering. In all of our apps, we generally prefer using PNGs.

Grant_Stead
Silver 5
Silver 5

Interesting… I currently have a google cloud function that catches and image, and converts it to grayscale… at some point, I’ll force that to output .png instead of jpeg… I’ll try and remember to report back…

Fabian_Weller
Gold 1
Gold 1

Awesome. Thank you so much for this information @LeventK.

@Grant_Stead How are you doing the conversion?

Grant_Stead
Silver 5
Silver 5

We have a google cloud function that watches our cloud storage buckets. Then passes the image through JS Sharp Library, then we post a new version of the image to cloud storage, and using the AppSheet API, we write the file path of the edited file back to the column.

Kirk_Masden
Gold 1
Gold 1

I agree with @khuslid .  In fact, I was just about to make the same request. For me, on my app "Store content for offline use" functions primarily to make certain images that are part of the interface I have built to appear instantly.  The large numbers of images that aren't integral to my user interface can take a second or two -- but I want images like the following to appear instantly:

Screen Shot 2022-03-07 at 16.17.12.png

In my educational app, "Way to go!" and "Good job" and other images just don't cut it if they appear late.  But, setting all images to be read into the app memory may cause performance issues.  

In my app, I have a very concrete performance issue with a QuickChart URL:

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/QuickChart-doesn-t-display-reliably-on-iPhones/...

Being able to either set the storage norms by table or by column would fix my problem.

Kirk_Masden
Gold 1
Gold 1

By the way, even though no one commented, @hcquadros has made the same request:

https://www.googlecloudcommunity.com/gc/Feature-Ideas/Store-content-for-offline-use-for-specific-tab...