Building an Image Gallery with Next.js, Supabase, and Tailwind CSS

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 72

  • @starmorph
    @starmorph Рік тому

    the loading in from the table DX is so nice

  • @kubakazimierczak6646
    @kubakazimierczak6646 Рік тому +23

    Thanks for the tutorial about the absolute basics! A few notes for future followers who would follow this with Next 13:
    For the JS:
    - the `next/Image` used in tutorial is `next/legacy/Image` in Next 13, but you can use the `next/image` by replacing `layout="fill"` with just `fill` prop
    - the `res.unstable_revalidate` is now `res.revalidate`
    For the Supabase
    - the "Function hooks" in supabase are now called "Webhooks"

    • @ramsundararaman6615
      @ramsundararaman6615 Рік тому

      Thanks for the pointer. but simply using the fill messes with the aspect ratio, though!

  • @bossdaily5575
    @bossdaily5575 2 роки тому +12

    can you send a link to the csv file you used to populate the database?

  • @krazymeanie
    @krazymeanie 2 роки тому +27

    Freaking loved this. I've really been missing your tutorials/videos man. Now that React 18 is soon to be released I'm assuming we'll be seeing a lot more of you for a while. Keep up the good work, it's undeniably appreciated.

    • @reubence_
      @reubence_ 2 роки тому +2

      we need a react 2030 course haha

  • @yoJuicy
    @yoJuicy 2 роки тому +8

    OMG this is amazing. I literally just built this exact same thing. I ran into hardship with getStaticPaths and the slug file and fetching from my DB... Would love more content with this stack!

  • @shashank99
    @shashank99 2 роки тому +6

    Super excited as lee came back with supabase. Next.js + Supabase = 🔥

  • @Troy-ol5fk
    @Troy-ol5fk 2 роки тому +1

    I added a 'keywords' field in the images table, but when I display it in the component it throws an error : Property 'keywords' does not exist on type 'Image'.ts(2339), how can i fix it ? I can't find the definition of the Image type

  • @yetkindev
    @yetkindev 2 місяці тому

    npx create-next-app --example with-tailwindcss image-gallery
    no need thanks 😃

  • @matthewchukwu1306
    @matthewchukwu1306 2 роки тому +1

    Hello @Lee, please what is the alternative for updating the next.js app since the supabase function hooks is still in ALPHA?

  • @mastercode7851
    @mastercode7851 2 роки тому +1

    thanks alot very nice tut

  • @marlonberaldo5609
    @marlonberaldo5609 7 місяців тому

    Refactor this video in the new nextjs app router doing some pagination or infinite scrolling properly, there are no content about that!!

  • @kiyoshitanaka4023
    @kiyoshitanaka4023 2 роки тому +2

    Regarding React 18, which is just about to come out. Can you please make an in depth tutorial about SSR Streaming with Next.js?

    • @leerob
      @leerob  2 роки тому +8

      Planning to make React 18 and Server Components content in the future, yes!

    • @kiyoshitanaka4023
      @kiyoshitanaka4023 2 роки тому

      @@leerob That would be nice! But are also planning making content on SSR Streaming and Progressive Hydration? I think that's also a huge part of React 18

  • @ZainFacts
    @ZainFacts 9 місяців тому

    Really love this video, can you please share the csv file which you have used in this video?

  • @simonswiss
    @simonswiss 2 роки тому

    TIL about the `onLoadingComplete` prop - good stuff Lee! ✨

  • @dougui.p
    @dougui.p 2 роки тому +1

    Great content, thanks for sharing! 🚀

  • @naimurX
    @naimurX 2 роки тому +1

    Why this not work on replit

  • @codelucky
    @codelucky Рік тому

    The storage isn't sufficient on Supabase(not self-hosted). Do you know how do I connect AWS S3 to it?
    Vercel + Supabase + S3? Possible?

  • @anuj7286
    @anuj7286 2 роки тому +1

    This is super amazing!!

  • @BarryDocherty
    @BarryDocherty 2 роки тому

    Pretty slick video, how about expanding that gallery where clicking on an image opens up a Sliding Gallery.

  • @Houseofstartup
    @Houseofstartup Рік тому

    I need that csv file

  • @hyggedev2124
    @hyggedev2124 2 роки тому

    Is it useful to use a database like this for something quite simple, versus a CMS or cloudinary? Genuine question would like to know people's thought! Can't wait to try suoerbase

  • @jaular14
    @jaular14 2 роки тому

    Hi!
    How can i use res.unstable_revalidate(`/image/${id}`) with dynamic routes?

  • @seanki
    @seanki Рік тому

    This does not work very well for my next.js 12 project, it works for some images, and on some reloads, and sometimes the blur lags so hard it feels like it's going in 20 fps. Using Firebase and it's a larger project than the one you demoed. I'm pretty sure the root to my issues is due to how I have set things up, shame I will probably not have time to implement it since this is a rather nice thing to see as content is loading up

  • @elegiggle7882
    @elegiggle7882 2 роки тому

    Great video. A question: could you add an RSS feed to your blog? I always forget to check it and don't use cancer like Twitter.

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt Рік тому

    Excellent project, hopefully you can upload more content from tailwind and nextjs

  • @Vidzhut
    @Vidzhut Рік тому

    Wow. Nice work.
    I love to add some filters to sort content.
    Can you give any hint on how to filter content by onclick?

  • @matthewchukwu1306
    @matthewchukwu1306 2 роки тому

    Nice one @Lee, thanks a lot. I might consider moving from strapi to supabase.

  • @andreinasesarg
    @andreinasesarg 2 роки тому

    Thank you VERY much, this is very helpful!!!

  • @tridungbk2010
    @tridungbk2010 2 роки тому

    Great!, thanks, Lee, look forward next video from you

  • @aminedaimallah310
    @aminedaimallah310 2 роки тому

    i have a question, how fill layout worked for you without relative parent div?

  • @The.eminence
    @The.eminence 2 роки тому +1

    welcome back Lee

  • @abhim6380
    @abhim6380 2 роки тому +1

    Why aren't you using the blurDataUrl prop here

    • @leerob
      @leerob  2 роки тому

      Because I have remote images instead of local ones (e.g. in the file system): nextjs.org/docs/basic-features/image-optimization#local-images
      You could also compute blurDataUrl on the server and send it back, but that's a video for another time :)

    • @abhim6380
      @abhim6380 2 роки тому

      @@leerob I can't believe Lee Rob is replying to me. I'm using plaiceholder to generate blurred images. I get 404 when I deploy to vercel but works in local.
      Also it'd be nice if you guys could provide more information about SSR and how next uses SSR in the docs.

  • @ooogabooga5111
    @ooogabooga5111 2 роки тому

    completed this project on my own, add on there is no need to set the webhook to be post, you could just use get as it is

  • @tridungbk2010
    @tridungbk2010 2 роки тому

    Hi Lee, i'm still concerned about one thing is each time you navigate to other page then come back to this page blur effect shows up again, it is great for the first time while image is loading, but it will get boring if the effect show over and over again, is there any solution for that?

  • @JGBSolutions
    @JGBSolutions 2 роки тому

    hey Lee, what camera are you using? Nice tutorial by the way.

  • @Troy-ol5fk
    @Troy-ol5fk 2 роки тому

    why is there a 'cn' method inside className ?

  • @ooogabooga5111
    @ooogabooga5111 2 роки тому

    super is stil in beta with their triggers, which is sad to see

  • @techjandro
    @techjandro 2 роки тому

    Ok now I’m in love with this stack!!!

  • @mauroquiroga225
    @mauroquiroga225 2 роки тому

    OMG you REALLY make it look easy. Amazing content, thank you very much!

  • @silenux7419
    @silenux7419 2 роки тому

    This was awesome.
    Thanks for sharing your knowledge.

  • @monty_2969
    @monty_2969 2 роки тому

    This was great! Used this concept to do the same using styled components

  • @jereconjota
    @jereconjota Рік тому

    Hi Lee! I tried to do this on next13, but I'm having some issues with the new Image component. Layout and objectFit are deprecated, and the images just fill the whole screen :/ any idea?

    • @endlessia
      @endlessia Рік тому +1

      Hii ! I don’t know if this would help but I put the Image in a div, this div has a className that contains w-64 h-64 , then I added fill={true} and and a className with « object-cover » properties to the Image. Hope it would solve your problem ! I’m struggling too with this new Next Image !

  • @ordruker9675
    @ordruker9675 2 роки тому

    Lee, you're my hero! I love your videos

  • @roobs456
    @roobs456 2 роки тому

    It would be great to have a tutorial on image optimisation with remote images. layout = 'fill' doesn't seem to optimise images very well.

  • @helocat2124
    @helocat2124 2 роки тому

    Thank a lot for putting an effort to make it. This is high quality content

  • @amirnoorani5017
    @amirnoorani5017 2 роки тому

    Simple presenting is awesome as always

  • @scotty529
    @scotty529 2 роки тому

    I don't understnd why you'd need to redploy (and not just refresh) if changes are made in a live database. Is that something specific with getStaticProps?

    • @leerob
      @leerob  2 роки тому +4

      This is because we're building a static page (with getStaticProps) instead of fetching data every request on the server (with getServerSideProps) or loading images on the client side (using just React).

    • @leerob
      @leerob  2 роки тому

      I'd recommend going through nextjs.org/learn if some of these concepts are new :)

  • @a7medjadan
    @a7medjadan 2 роки тому

    hey Lee, thanks a lot, I've tried to apply the `revalidate api` just like you did, but with strapi cms, but for some reason id didn't work. !

    • @leerob
      @leerob  2 роки тому

      Hey, do you have a repo you can share to look at?

    • @a7medjadan
      @a7medjadan 2 роки тому

      @@leerob I have send you a twitter DM, thanks in advance

  • @mahfoudh_arous
    @mahfoudh_arous 2 роки тому

    Excellent tutorial, so concise and clear!

  • @andrewzinkel3045
    @andrewzinkel3045 Рік тому

    Let's say you want to do a gallery with a large amount of images (200+). Is there value in pagination here for efficiency? If so, what is the best way to implement? Thank you!

    • @aurelianspodarec2629
      @aurelianspodarec2629 Рік тому

      200+?
      I'm thinking about 100.000+ images xd

    • @ryadean
      @ryadean Рік тому

      The images are lazy loaded so pagination wouldn't be needed for such a small number of images.

    • @aurelianspodarec2629
      @aurelianspodarec2629 Рік тому

      @@ryadean 100k is small?

    • @andrewzinkel6012
      @andrewzinkel6012 Рік тому

      @@ryadean Thanks! Out of curiosity, at what point do you feel it would be necessary to introduce pagination? For context, most of these image files in the gallery are around 75-100kb in size.

  • @luisdawiz69
    @luisdawiz69 2 роки тому

    niceeeeee

  • @behruzberdiyev4136
    @behruzberdiyev4136 2 роки тому

    I don't know typescript, can I do dis

  • @bryanheinz
    @bryanheinz Рік тому

    i did exactly the same but, when i reload its not changing as it should. but when i check the /api/validate i saw "invalid token" what does it mean?

  • @XahidEx
    @XahidEx 2 роки тому +1

    Waiting.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................