© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
4 replies
Cheqo

Uploading image to the same pathname and retrieving up to date image

Hello I store users avatar photos like this:
        const { data: updatedRecipe, error: updateError } = await supabaseAdmin
          .from('users_public')
          .update({
            id: user.id,
            avatar_url: `https://pnznokedxkdoassdldsp.supabase.co/storage/v1/object/public/user-content/${data1?.path}`,
        const { data: updatedRecipe, error: updateError } = await supabaseAdmin
          .from('users_public')
          .update({
            id: user.id,
            avatar_url: `https://pnznokedxkdoassdldsp.supabase.co/storage/v1/object/public/user-content/${data1?.path}`,

The problem is that each time user updates profiel photo, I don't see the up to date photo on the client, I assume because of caching, even when I go to supabase dashboard the images are not updated, it takes couple of hours to see updated images on the client.

That is super confusing to users, so what can I do to avoid this, and make sure that I always show the most recent photos?

Is there such thing as
invalidateCache
invalidateCache
method or something?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Error while uploading image to storage bucket
SupabaseSSupabase / help-and-questions
6mo ago
NextJs 14 w/App router retrieving images to use in a Next Image component.
SupabaseSSupabase / help-and-questions
3y ago
Up-to-date SvelteKit + Supabase auth example
SupabaseSSupabase / help-and-questions
3y ago
How to get the current date with the date type?
SupabaseSSupabase / help-and-questions
4y ago