Handle iCloud photos in custom gallery

I have collection view with images from "recent album". These images are then used to create filters. Everything works well until the user turns off the internet. Some of my photos are partly stored in iCloud due to "sotrage optimization" enabled in iCloud settings. When I click on image in collection view I need to have access to full size image (I know the download is required in this case), but how can I detect during assets fetching that user has photos (or its part) in iCloud? Or maybe it is possible to take the largest possible size stored in a local gallery?
any update on this? I'm having a similar issue when user selects Storage Optimisation.
Handle iCloud photos in custom gallery
 
 
Q