Getting Started with NextJS Dynamic OpenGraph Images

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

КОМЕНТАРІ • 24

  • @JollyCoding
    @JollyCoding  11 місяців тому +12

    Note, they just announced that in NextJS 14 the import will change from "next/server" to "next/og" so watch out for this if watching this in the future!

  • @maker._
    @maker._ 9 місяців тому +1

    Been a dev for 10 years and I learned today! Incredible job champ! Salute 🫡

  • @diegorincon3080
    @diegorincon3080 8 місяців тому +3

    This is the first tutorial that actually shows how to import an image to include it in the final OpenGraph Image. I've looked everywhere. Thanks a lot!

  • @lucasmaia7553
    @lucasmaia7553 9 місяців тому +2

    Your video has an amazing quality and excellent content. This channel will be huge. Glad to be part of since the beginning

  • @haekalazmi
    @haekalazmi Місяць тому

    Thanks a lot, I dont know why, but I follow your code step by step and it worked

  • @MaxRohowsky
    @MaxRohowsky 2 місяці тому +1

    this was super helpful.

  • @M7ilan
    @M7ilan 9 місяців тому +2

    The image won't load with a custom font. I've been trying to fix it, but the problem persists.

    • @JollyCoding
      @JollyCoding  9 місяців тому +1

      Hmm, odd. If you’re using a local font I’ve seen a bug where people have only had luck using a woff file for fonts. Alternatively some people have suggested that moving the fetch for the font inside of the Image function helps.
      github.com/vercel/next.js/issues/48081

  • @sanjoyrakshit842
    @sanjoyrakshit842 9 місяців тому +3

    Very good tutorial ❤❤

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

    In the example provided with fonts, u actually apply fonts to the whole image, rather than to specific element.

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

    you teach really well, thank u for this video, your new sub

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

    I got this error: Error: failed to pipe response

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

    Can we use components in ImageResponse

  • @hugoleonardo3590
    @hugoleonardo3590 5 місяців тому

    Very good content. Ty.

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

    Brother source code give me

    • @JollyCoding
      @JollyCoding  9 місяців тому +2

      The code for the blog one can be found here: github.com/jolbol1/JamesShopland.com/blob/main/pages/api/og.tsx
      For the simple one I don’t have one but this should be enough with a basic create next app nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#generate-images-using-code-js-ts-tsx

    • @bolarinwadamilare3789
      @bolarinwadamilare3789 Місяць тому

      @@JollyCoding thanks for providing the source code it helps me today

  • @bibeshdhital1067
    @bibeshdhital1067 5 місяців тому

    Like i have: restaurants/xyz. Where xyz is the restaurant and i need to fetch the details of the specific restaurant. What to do in this case ?