chrome-aws-lambda
og-image
DISCONTINUED
Our great sponsors
chrome-aws-lambda | og-image | |
---|---|---|
12 | 19 | |
3,132 | 3,977 | |
- | - | |
0.0 | 3.6 | |
10 months ago | about 1 year ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
chrome-aws-lambda
-
Lambdas vs EC2
Lambda would be my choice for this. You could even stay within the free tier depending how often you run this process. You can orchestrate puppeteer UI flows in lambda using this package https://github.com/alixaxel/chrome-aws-lambda My team does this and it works great.
-
Building a PDF Generator using AWS Lambda
git clone --depth=1 https://github.com/alixaxel/chrome-aws-lambda.git && \ cd chrome-aws-lambda && \ make chrome_aws_lambda.zip
- Ask HN: What are the best tools for web scraping in 2022?
- Is it possible to use functions requiring a GPU in a serverless google cloud function?
-
Dynamic Open Graph images with Next.js
When requesting the API route, the Next.js serverless function will actually spin up a web browser on the server (a headless instance of Chromium, using chrome-aws-lambda). Next, a webpage will be generated with HTML we can define ourselves. This HTML will be used to construct the image. That means that as a developer we can generate images using HTML and CSS, technologies we are already familiar with!
-
How we keep our Serverless deploy times short and avoid headaches
This plugin is used for all our AWS Lambda deployments, using a wide range of Node modules, some with more quirks than others. We use it together with Lambda Layer Sharp and Chrome AWS Lambda.
-
How to create a chrome profile programmatically in aws lambda?
I was able to successfully to run chrome with puppeteer in AWS Lambda for a similar use case. I used an "optimized" version of chrome packaged as an AWS Lambda Layer.
-
Create PDF documents with AWS Lambda + S3 with NodeJS and Puppeteer
git clone --depth=1 https://github.com/alixaxel/chrome-aws-lambda.git && \ cd chrome-aws-lambda && \ make chrome_aws_lambda.zip
-
chrome binary not found aws lambda
Simplest method use ]Puppeteer](https://blog.risingstack.com/pdf-from-html-node-js-puppeteer/) with chrome-aws-lambda.
-
Puppeteer performance in AWS Lambda Docker containers
For example, we can use chrome-aws-lambda binaries. They were built to fit Lambda layers, so the size is much smaller than regular chrome installation.
og-image
-
Generate dynamic OG images with Next.js and vercel edge functions
Now here's the thing since these are part of the meta tags, and The image shown in the tags are ... well! images, making them dynamic is a bit tricky. generating images isn't a menial task that just every web server can do ... it's resource intensive, time-consuming and all the other nightmares. and making it part of your dynamic web app is another ball game altogether. So what's new? well, @vercel/og is, this library lets you build image content from HTML/React that too insanely fast, like really fast . and you can pair this with any edge network like AWS Lambda on the edge, Cloudflare workers, etc to make it even faster.
-
Show HN: Satori – Convert HTML and CSS to SVG in Milliseconds
Thanks! Not to discourage anyone from using Vercel services if they’re interested (y’all are doing great stuff on this and lots of other fronts), but! I’d be remiss if I didn’t point out the unpublished-but-MIT-licensed repo I could find.
For anyone else who’s curious it looks like the pertinent source[1] can be self-hosted. I’m on mobile so I’m gonna limit my peering into the source, but it appears to wrap Chromium to do the PNG generation. Quite a bit different from my solution (which takes SVG-producing JSX and anything producing CSS, and renders to PNG with Sharp).
I’m curious how much overhead using Chromium adds, and whether alternatives like Sharp were considered.
-
How does github-readme-stats work?
It’s not embedding. When you paste that image url a serverless function running a headless browser requests say a next app which loads up a page based on the params in the url. Then we take a snapshot and image data is sent back as response to you hence the image appears. You can check out this: with NextJS and puppeteer
-
Dynamic Open Graph images with Next.js
But what if the content of the page is not visual at all, and no photo really suits the contents of the page? And what if we have a lot of these pages, with dynamically generated content? Luckily we are not limited to photography, we can use text! The prime example of this is how GitHub generates previews for issue URLs: they generate an image containing enough info such that users know what they will click on. These images are generated on-demand, as storing an image for every GitHub pull request or issue would be unfeasable. Another example is Vercel, which even open sourced their Open Graph Image as a Service that they occasionally use on blog posts or announcements.
-
Seamless Open Graph images generation library for Next.js
Hi, it is basically a embedded, better and easier (API-wise) version of https://github.com/vercel/og-image
-
How do I change the image that Google shows for my website?
Vercel has a really good simple generator if you don’t want to spend time on graphic design: https://og-image.vercel.app
-
What's Next(.js)? - Prologue
I ended up choosing Puppeteer and capture the web page, which is pretty far from what I initially wanted. Puppeteer needs more time and memory than I prefer. I can generate an image, download it, and then use it as a cover image. But, I want to create an API (with Next.js API routes) that functions as Open Graph Image as a Service. I later found out that Vercel already made this 🥲, still, I want to create my own.
-
Boring Avatars – react library to generate custom avatars
That sounds a great side project, since some developers might prefer a static svg dynamically created via url like boringavatar.app/[username here].
There's some prior work on this: e.g. https://github.com/lfades/static-tweet and https://github.com/vercel/og-image.
-
Automate Open Graph image creation
If you are a developer, you've probably seen the Open Graph images (part of Open Graph Protocol) generated by popular dev related websites like DEV.to or even Vercel's Open Graph Image as a Service. Both examples are using an approach to render image related to the content, so it contains some standard layout background, an image in it that is related to the content (vercel's logo or author's avatar), headline or title of the article, and a description.
What are some alternatives?
terraform-aws-next-js - Terraform module for building and deploying Next.js apps to AWS. Supports SSR (Lambda), Static (S3) and API (Lambda) pages.
Google Fonts - Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
puppeteer - Node.js API for Chrome
next-api-og-image - :bowtie: Easy way to generate open-graph images dynamically in HTML or React using Next.js API Routes. Suitable for serverless environment.
chrome-aws-lambda-layer - 58 MB Google Chrome to fit inside AWS Lambda Layer compressed with Brotli
serverless-webpack - Serverless plugin to bundle your lambdas with Webpack
vscode-vercel - WIP: Keep an eye on ▲ Vercel deployments without ever leaving Visual Studio Code.
stylegan2-pytorch - Simplest working implementation of Stylegan2, state of the art generative adversarial network, in Pytorch. Enabling everyone to experience disentanglement
puppeteer-demo - How to use Puppeteer to take webpage screenshots and generate dynamic Open Graph images for social sharing
Next.js - The React Framework
lambda-layer-sharp - An AWS Lambda Layer for the Sharp node module. Automatically published on updates.
boring-avatars - Boring avatars is a tiny JavaScript React library that generates custom, SVG-based avatars from any username and color palette.