How to show Images SMOOTHLY with Next.js Image Component

Поділитися
Вставка
  • Опубліковано 14 жов 2024
  • ❤️Please Support me by subscribing to my channel 👉🏻www.youtube.co...
    In this tutorial video, I will be showing you how to use the Next.js Image element to load images seamlessly on your website. With the help of this powerful tool, you can ensure that your images are optimized and load quickly, without compromising on quality.

КОМЕНТАРІ • 26

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

    Thank you! Can you show blurDataURL as well if you get a chance?

  • @ingoandelhofs
    @ingoandelhofs 8 місяців тому

    What about if the image source is changing, how to smoothly transition even when the two different versions are requested directly after each other

  • @Spinall01
    @Spinall01 Рік тому +2

    How could this be done in a server component?

  • @andrewc8125
    @andrewc8125 Рік тому +2

    Very nice. But It will ignore the cached image. Would be nice if there is solution for this.

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

      Hi, I do some research about it and let you know 🌹

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

    great tip, thank you.

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

    Works great! Thanks a lot 😊

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

      Thanks for your nice feedback 🌷

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

    Can you show code onloadingxomplte? I cant imagine that's code.or can you share fully image component code

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

      The Image component is Next.js 13 Image component. you can find it in next.js documentation

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

      @@SakuraDev image component nextjs have onLoadingComplete? i see i see thankyou 😍

  • @Happyday-nn6rh
    @Happyday-nn6rh Рік тому +1

    i like trick of nextjs TNX

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

    Nice trick 👍

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

    ok, but how do I use it with placeholder='blur" in next component? when i use it, the blurDataURL also got with opacity-0 until the onLoadingComplete function trigger, please help me

  • @treyrader
    @treyrader 11 місяців тому

    you do know that you don't have to use a custom unit for a 2s transition speed right? I think that's 200 in tailwind. also, you can just set the oapcity to none. That's tailwind's version of removing it from the V dom. You must be just learning the tailwindcss library huh?

    • @tamaspal1864
      @tamaspal1864 10 місяців тому

      2s is 2000ms not 200

    • @treyrader
      @treyrader 10 місяців тому

      @@tamaspal1864 damn im dyslexic. Had i plugged it in, i'd have known this lol

  • @MayankMishra-oy5xe
    @MayankMishra-oy5xe 7 місяців тому +1

    One slight problem with this approach. If you add 2 seconds of delay in showing images, it further increases your LCP time which is poor for SEO. The LCP time should be less then 2.5 seconds at all cost. So even if you reduce the above number from 2 to 1 seconds, your LCP will still be affected as there is already some delay added to LCP due to latency and rendering code. So I won't recommend this approach for production use cases and specially not if SEO plays vital role in your Business. Perhaps there could be another way...

    • @SakuraDev
      @SakuraDev  7 місяців тому +1

      Nice tip 👍. I didn't know that. Thanks for bringing that to my attention 🙂

    • @MayankMishra-oy5xe
      @MayankMishra-oy5xe 7 місяців тому

      Always brother. Actually I too just realised this after I used this approach and did some SEO test.@@SakuraDev

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

    Thanks

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

      Thanks. I'm glad you found the video helpful