New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ogimage no longer working #323
Comments
Just upgraded chrome-aws-lambda, and for that I need to stick puppeteer-core to 10.1.0 until this is merged: alixaxel/chrome-aws-lambda#264 Not sure if that will fix it but worth a shot |
that upgrade fixed the rendering, but they are blank. likely related to the Error on this page, which the ogimages are screenshotted from: https://wesbos.com/thumbnail?title=test Maybe the location.href is null? const url = new URL(location.href); |
@wesbos I did a test in the browser console and I think This code here const link = url.searchParams.get('url'); needs to be const link = url.searchParams.get('title'); |
Ohh yeah I was just throwing title in there for a test. Let me get a fully working URL to test |
just replace the Pretty sure thumbnail page is working fine, but look at this: Blank BUT if I change the URL to replace & with &, it works: So I bet I am encoding the URL incorrectly. Give me 2 mins |
Seems to only twitter: https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fwesbos.com%2Fuses |
I don't have facebook so I can't see what is there 😅 But yeah I'm wondering if it's Twitter again, if it's the same issue as what caused the Course Marketing Pages to fail to render? |
ohhh maybe, what was the issue with that one again? |
The full HTTPS URL path was missing from the Twitter OG Image tag, only the relative path to the image was used. |
Ohhh yeah, I think this is formatted properly. IF you run I just deployed a cache bust to the image to see if that fixes it |
Awesome! Haha 😄 |
IN summary, upgrading the deps and then flushing out cached broken images fixed it. Thanks for the help @Asjas |
serverless function is crashing.
https://wesbos.com/.netlify/functions/ogimage?title=Wes+Bos&url=https%3A%2F%2Fwesbos.com%2F*
@Asjas Do you think you could take a look at this for me? Will DM you
The text was updated successfully, but these errors were encountered: