Git Product home page Git Product logo

Comments (11)

adityadeshlahre avatar adityadeshlahre commented on May 24, 2024 2

Seems like

1 Dynamic Link Preview works fine
previewWorking

2 Shortened URLs Link Previews are dead
previewDead

on the way to fix 😃

from formbricks.

jobenjada avatar jobenjada commented on May 24, 2024 1

hmm @mattinannt maybe you have an idea?

// can confirm the normal preview generation works :)

image

from formbricks.

mattinannt avatar mattinannt commented on May 24, 2024 1

@adityadeshlahre Yes, this is the right endpoint for generating the image :-)
The image from the og endpoint is used in the generateMetadata function of the /s/[surveyId] page:

const ogImgURL = `/api/v1/og?brandColor=${brandColor}&name=${surveyName}`;

So one thing you could try is to also add a generateMetadata function to apps/web/app/[shortUrlId]/page.tsx.

But this may lead to duplicated code and issues since we also need to query all the data in the shortUrl redirect. There might be a better option where we can reference the content of the redirected page in the meta data so we tell the preview loaders where to look for the meta data. See this stackOverflow thread for an example:
https://stackoverflow.com/questions/54160345/how-to-make-open-graph-links-work-with-301-redirects

from formbricks.

mattinannt avatar mattinannt commented on May 24, 2024 1

@adityadeshlahre No worries, thanks for trying to solve it 😊đŸ’Ē

from formbricks.

adityadeshlahre avatar adityadeshlahre commented on May 24, 2024

i would like to give it a try 😃 !

from formbricks.

Dhruwang avatar Dhruwang commented on May 24, 2024

Sure, go for it @adityadeshlahre 😊🚀

from formbricks.

jobenjada avatar jobenjada commented on May 24, 2024

@adityadeshlahre any updates? :)

from formbricks.

adityadeshlahre avatar adityadeshlahre commented on May 24, 2024

Hey @jobenjada @Dhruwang
really sorry for late replay
i am still trying to fix the bug !

I got to know which component is responsable for image generation [file]
but stuck on how the file is getting called at time of publishing New Survey

For now preview image generation is only happening for main /s/[surveyId] link only
and not for the short URL /[shortUrlId] link.
[maybe be VERCEL og-image-generation doesn't work for shortURL because lack of Metadata/Props](might am wrong here)

on shorting [main URL] from different URL shorting service its PREVIEW-IMAGE working fine.

need more lights on the bug !

from formbricks.

jobenjada avatar jobenjada commented on May 24, 2024

@adityadeshlahre will you pick this up again? :)

from formbricks.

adityadeshlahre avatar adityadeshlahre commented on May 24, 2024

Hey @jobenjada sorry for not responding for way long !

would like get this issue unassigned for now .

I think i will take back seat and learn from the changes if anyone
contributes on this issue 🙂

Thank You

from formbricks.

KapadiaNaitik avatar KapadiaNaitik commented on May 24, 2024

/assign

from formbricks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.