OK, if you have lots of Twitter embeds in your website, I've written an easy(ish) way to replace them with static images & alt text.

github.com/edent/Tweet2Img

Run:
`python tweet2img.py 1234`

And you'll get a ready-to-paste piece of HTML with a data-encoded image.

`<a href="https:/ /twitter.com/edent/status/123"><img src="data:image/webp;base64,Ukl..." width="550" height="439" alt="text from tweet."/></a>`

It also saves the WebP and alt text if you need them.

1
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Replies