Complete Guide on Placeholder using Nextjs Image, Plaiceholder, Blur, Color

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 84

  • @ProLactationNation
    @ProLactationNation 11 месяцев назад +25

    For those searching for a quick solution without relying on a third party:
    const imageBlur = await fetch(
    `your image url`
    ).then(async (res) => {
    return Buffer.from(await res.arrayBuffer()).toString("base64");
    });

  • @rodrigosalmeron7216
    @rodrigosalmeron7216 Год назад +5

    This is actually really helpful, great content as always. This is kind a different from all the awwwards hacks, but it's a really cool video with lots of great tips on handlings blurs. I've been looking for some educational video about this, and everyone does the exact same video explaining nothing xD. Cheers, your content its getting better every new video.

  • @imransefat8770
    @imransefat8770 Год назад +1

    I was literally having problem with bluebashing the placeholder images the other day! Cheers mate!

  • @iAmTheWagon
    @iAmTheWagon 6 месяцев назад +3

    Absolutely incredible tutorial. Detailed and easy to understand.

  • @adlerspencer
    @adlerspencer Год назад +1

    Thanks, Mr. Larose! Great contents! (as usual) 🚀

  • @bettermarquefilms
    @bettermarquefilms Год назад +1

    Amazing video Olivier.
    Thanks man.
    Please I have a hard time using videos in Next Js. Please can you do a video on that too?

    • @olivierlarose1
      @olivierlarose1  Год назад

      I tried too and I found no real difference with other React Framework

  • @aghilest.m.a1118
    @aghilest.m.a1118 Год назад

    Your channel is amazing man! keep going🔥👏🏻

  • @Diego_Cabrera
    @Diego_Cabrera Год назад +1

    Great video man. You give me loads of inspiration to create more videos!

  • @ogCoderGamer
    @ogCoderGamer Год назад +3

    Module build failed: UnhandledSchemeError: Reading from "node:fs/promises" is not handled by plugins (Unhandled scheme).
    Webpack supports "data:" and "file:" URIs by default.
    You may need an additional plugin to handle "node:" URIs.
    Not working anymore... getting above error. I am on next.js 13.5.6

    • @ogCoderGamer
      @ogCoderGamer Год назад +1

      Quick update on the same. Dyanmic image blur effect only works on serverside components. It will not work, if any of the parent is using "use client". And there is no way to use it if you are using framer-motion on parent.

    • @Heliz14
      @Heliz14 11 месяцев назад

      @@ogCoderGamer Thanks! I have the same issue. Sadly it doesnt work.

  • @filipesommer8253
    @filipesommer8253 2 месяца назад

    Awesome video, thanks!

  • @antoniomarques3131
    @antoniomarques3131 Месяц назад

    Great content. You have new subscriber. Thank you

  • @aymenbachiri-yh2hd
    @aymenbachiri-yh2hd 3 месяца назад

    Thank you so much olivier

  • @Diego_Cabrera
    @Diego_Cabrera Год назад +1

    Hey Oliver I was wondering what CMS did you use for your e-commerce website you built for your client. The one that is on your portfolio. Thank you in advance!

  • @TheVikastiwari123
    @TheVikastiwari123 Год назад

    Love u man..love from india..u solved my problem with next image

  • @khaledx30ify
    @khaledx30ify Год назад

    thank you Olivier another great video

  • @BoBTheBuilder-yz7gk
    @BoBTheBuilder-yz7gk Год назад

    Can u make a cool video of your own blog website, of how to make it's simple yet eligent.. BTW love from India 🤝🏻 great work bro recently discovered your channel..

    • @olivierlarose1
      @olivierlarose1  Год назад +1

      Thanks! If I get asked more for this I will✍️

  • @Anonemmas
    @Anonemmas 7 месяцев назад +1

    Is there any way to use this server component if any of it's parents are client components? The reason for this being that I'm using framer motion on most of the image parents and this seems to backfire

  • @جوادجیتی
    @جوادجیتی Год назад

    amazing title

  • @Love-id8gu
    @Love-id8gu Год назад +1

    Awesome video!!!
    🙌 Please make a Notion clone using Next.js stack, Prisma, PostgreSQL, Next-Auth, React-Hook-Form + Valibot, Shadcn UI, Typescript, Tailwind CSS.... Thank you very much! ❤❤❤❤❤

  • @deathdefier45
    @deathdefier45 Год назад

    Man you're a hero ❤️

  • @samahgad241
    @samahgad241 8 месяцев назад

    very helpful,thanks alot🤩😍

  • @FGA-47
    @FGA-47 5 месяцев назад

    Thanks man

  • @meaningmean
    @meaningmean Год назад

    super useful! thanks

  • @mateuszkoodziej1908
    @mateuszkoodziej1908 Год назад

    Awesome video, but it seems to me that if we have, for instance, 30-50 images to load and if we were to wait for every single buffer, there's going to be a big waterfall, am I right? in this case i think we should resolve all promises 🤔

    • @olivierlarose1
      @olivierlarose1  Год назад +1

      It’s all done server side when pre-rendering the page so it won’t affect load time

  • @yunhanhuang9304
    @yunhanhuang9304 Год назад

    I like your videos very much

  • @derciojds
    @derciojds Год назад

    Nice video as always.
    There is a typo on the title, I think.

    • @labhamjain3915
      @labhamjain3915 Год назад

      There's same typo in video also

    • @olivierlarose1
      @olivierlarose1  Год назад +1

      Hey guys Plaiceholder is the name of the library used it’s not a typo but thanks for backing me up! :)

    • @derciojds
      @derciojds Год назад

      @@olivierlarose1 Hey Oliver, thanks for letting me know! My bad for misunderstanding. Plaiceholder sounds like an interesting library, and now I know better. Keep up the great content! 😄👍

    • @labhamjain3915
      @labhamjain3915 Год назад

      @@olivierlarose1 oh, I see... lmao 😂

  • @jnem84
    @jnem84 11 месяцев назад

    I'm using a cms with the app router and trying to use plaiceholder on all of my images, but I can't figure out how to do it. Would you happen to know or clear up how I could do this?

  • @Originallyright
    @Originallyright Год назад

  • @OlamideOnabiyi
    @OlamideOnabiyi Год назад

    Valuable

  • @aminsoraya
    @aminsoraya Год назад

    Very useful

  • @anggapw
    @anggapw Год назад

    why i got "RefferenceError: require is not defined" when i import getPlaiceholder in my code?

  • @Sameerkhan-c1x4p
    @Sameerkhan-c1x4p Год назад

    youre underrated niggaa

  • @Skvdev
    @Skvdev Год назад

    How to use plaiceholder on the client side properly? Thnx in advance!

    • @olivierlarose1
      @olivierlarose1  Год назад +1

      Good question. Plaiceholder is a server-side library so I wouldn’t know

  • @oopss794
    @oopss794 Год назад

    0:19 btw : how to implement a progress bar in next js 13 ? i can't find a way to do that since there is no _app.jsx in my app & layout.jsx work differently

  • @delinuxist4480
    @delinuxist4480 11 месяцев назад

    how would you read the static file on client side since fs only works on server side

    • @olivierlarose1
      @olivierlarose1  11 месяцев назад

      Why would you want to do it client side? It’s better to do it server side so thats it pre rendered

    • @delinuxist4480
      @delinuxist4480 11 месяцев назад

      @@olivierlarose1 thanks bro

  • @raves_r3177
    @raves_r3177 6 месяцев назад

    is it possible to do this in a client component?

    • @olivierlarose1
      @olivierlarose1  6 месяцев назад

      No, Plaiceholder is a server-side library

  •  Год назад

    I keep getting this error: "Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead." I guess it's because I'm using async in declaring react component DynamicBlurPlaceholder. Why don't you get it?

    • @olivierlarose1
      @olivierlarose1  Год назад

      It seems you might have forgot to add 'await' before calling the function is that possible? If it's returning you a promise you need to 'await' it. Hope that helps!

    •  Год назад

      @@olivierlarose1 no, It's waiting for it. Might try making an asynchronous function outside the component function. Tomorow morning. It's 4am here lmao.

    • @razac_zr
      @razac_zr Год назад

      Did you find a solution on this?????? I'm stuck also here (using ts)@

  • @azura248
    @azura248 Год назад

    How to use plaiceholder in client component?

    • @olivierlarose1
      @olivierlarose1  Год назад +1

      Plaiceholder is server side so you can’t directly use it inside a client component. You can always fetch the base64 outside the client component and give it as props, or you could use the custom implementation that I showed in this video (without plaiceholder)

    • @azura248
      @azura248 Год назад

      let say i have 2 files, page.tsx is the server component, and ClientComponent.tsx is the client component, and i'm confused how to pass base64 from server component to client component with dynamic image from the backend.
      page.tsx
      ===================================
      const getBlog = async () => {
      .............
      };
      const Blog = async () => {
      const data = await getBlog();
      return (

      );
      };
      ===================================
      ClientComponent.tsx
      ===================================
      "use client"
      const ClientComponent = ({ data }: {data: any}) => {
      const [blogs, setBlogs] = useState(data)
      return (
      blogs.map((blog: any)=> {
      ........
      // this will return error cause plaiceholder can't be use in client component
      //
      })
      )
      }
      ===================================
      can u help me to fix this code, and sorry for my bad english, hope u understand🙏

  • @rafaelmassimo1549
    @rafaelmassimo1549 Месяц назад

    I guess I'm the only one that It couldn't implement this because is too hard

  • @tauhidxahmed
    @tauhidxahmed 9 месяцев назад

    auto pass doctor <
    (

  • @ruizxzx
    @ruizxzx Год назад

  • @taszidizaz4079
    @taszidizaz4079 Год назад