bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.67k stars 6.12k forks source link

Loading local images thumbnails #5401

Open Omaaarz opened 6 months ago

Omaaarz commented 6 months ago

I was recently trying to use thumbnail API to load local media thumbnails which weren't actually loading a thumbnail but the full image. By exploring glide codebase I found that Glide is using ThumbFetcher to load media store thumbnails which is basically querying the thumbnails table as in here. MediaStore.Images.Thumbnails is already deprecated and thumbnail generation is currently done using a different flow which doesn't insert anything in the thumbnails table anymore, which would lead to having the thumbFetcher return null.

I believe the current implementation of ThumbFetcher should shift towards calling ContentResolver.loadThumbnail or ContentResolver.openTypedAssetFile to make sure that glide is handling the media store thumbnail requests correctly.

Please let me know your thoughts!