Fix gradle build
Add support for media store thumbnails.