Skip to content

Add Compose-ImageLoader integration #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Nov 8, 2023

Conversation

jan-tennert
Copy link
Collaborator

@jan-tennert jan-tennert commented Nov 7, 2023

What kind of change does this PR introduce?

Feature (closes #309)

What is the current behavior?

N/A in master, coil-integration on developement (which only supports Android) (see #309)

What is the new behavior?

There is a new plugin: ImageLoaderIntegration, which can be added to a ImageLoader to display images from public and non-public buckets.

Create a new ImageLoader with the Supabase Fetcher. See the Compose-ImageLoader documentation for more information.

ImageLoader {
    //...
    components {
        add(keyer = supabaseClient.imageLoader)
        add(fetcherFactory = supabaseClient.imageLoader)
    }
    //...
}

You can easily display images from Supabase Storage like this:

AutoSizeImage(
    request = remember { ImageRequest(authenticatedStorageItem("icons", "user.png")) },
    contentDescription = null
)

Additional context

All Compose targets are supported.

@jan-tennert jan-tennert added the enhancement New feature or request label Nov 7, 2023
@jan-tennert jan-tennert self-assigned this Nov 7, 2023
@jan-tennert jan-tennert merged commit a2ce088 into development Nov 8, 2023
@jan-tennert jan-tennert deleted the imageloader-integration branch November 8, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant