Skip to content

Instantly share code, notes, and snippets.

View francishogue's full-sized avatar

Francis Hogue francishogue

  • Montréal
View GitHub Profile
@drewm
drewm / shoot-sharing-image.js
Last active December 13, 2024 16:56
Dynamic Social Sharing Images
const puppeteer = require('puppeteer');
const imagemin = require('imagemin');
const imageminPngquant = require('imagemin-pngquant');
// Get the URL and the slug segment from it
const url = process.argv[2];
const segments = url.split('/');
const slug = segments[segments.length-2];
(async () => {