https://github.com/munawwar/social-image-service
🎨 Dynamically generate social media images for web pages. Deploy to AWS Lambda
https://github.com/munawwar/social-image-service
social-images
Last synced: 6 months ago
JSON representation
🎨 Dynamically generate social media images for web pages. Deploy to AWS Lambda
- Host: GitHub
- URL: https://github.com/munawwar/social-image-service
- Owner: Munawwar
- License: mit
- Created: 2023-07-16T11:49:05.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-14T15:43:03.000Z (over 1 year ago)
- Last Synced: 2025-03-19T20:46:09.122Z (7 months ago)
- Topics: social-images
- Language: JavaScript
- Homepage:
- Size: 2.78 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Social Image Service
Dynamically generate social media images for web pages, using AWS Lambda ([arc.codes](https://arc.codes)), Satori and resvg.
# Step 1: Design
```sh
# Use node.js v20.x
# I use fnm node.js version manager
# fnm install 20
npm ci
npm run preview
```Start editing JSX and styles at `src/http/get-index/get-open-graph-jsx.js`
# Step 2: Test image generation locally
```sh
npm run dev
# Test end-point
open http://localhost:3333/?title=Queues%20with%20Gmail&tag=YOLO
```# Step 3: Deploy to AWS
Set AWS credentials named `personal` in `~/.aws/credentials` file.
```
[personal]
aws_access_key_id=
aws_secret_access_key=
``````sh
npm run deploy
# Once it completes, it will display the deployed service URL
```Use the following tags in your head tag (after filling the placeholders):
```html```