Simple CLI to warm the cache of social images in all pages from a sitemap.

Overview

warm-social-images

Simple CLI to warm the cache of social images in all pages from a sitemap.

NPM Build Status Prettier Code Formatting

Why

Using serverless functions to generate images for social media is pretty common.

If you're caching them with a CDN like Vercel or Cloudflare, then they will resolve quickly after the first GET.

But after fresh deploys, all of these social images will resolve very slowly, which may impact how your site is viewed on social media.

Usage

Usage:
  $ warm-social-images <sitemap-url>

Commands:
  <sitemap-url>  Fetches social images from all of the pages in a given sitemap

For more info, run any command with the `--help` flag:
  $ warm-social-images --help

Options:
  --concurrency <concurrency>  Sets the concurrency for processing pages (default: 8)
  --silent                     Silences logging (default: false)
  -h, --help                   Display this message
  -v, --version                Display version number

Example

npx warm-social-images https://transitivebullsh.it/sitemap.xml

which outputs:

processing 98 pages
2: 21.5 kB https://transitivebullsh.it/api/social-image?id=9a7ddf29-7344-4067-bbc5-ce0a4e0e0058
3: 66 kB https://transitivebullsh.it/api/social-image?id=076e0ecd-03dd-42db-a525-d67f18501500
0: 24.3 kB https://transitivebullsh.it/api/social-image?id=78fc5a4b88d74b0e824e29407e9f1ec1
1: 24.3 kB https://transitivebullsh.it/api/social-image?id=78fc5a4b-88d7-4b0e-824e-29407e9f1ec1
...
97: 24.1 kB https://transitivebullsh.it/api/social-image?id=3aab2f4a-9ead-4952-8efa-71fdc5141d54
93: 22.5 kB https://transitivebullsh.it/api/social-image?id=0c0dc729-b961-4998-8611-c42fa6744276
{ numSuccess: 98, numError: 0, numNotFound: 0 }

License

MIT © Travis Fischer

Support my OSS work by following me on twitter twitter

You might also like...

Compare James Webb Space Telescope images to older images.

Compare James Webb Space Telescope images to older images.

How much more powerful is the James Webb Space Telescope when compared to Hubble? Find out! More info Want to help out? CONTRIBUTING.md Blog post with

Jan 3, 2023

Easiest 1-click way to install and use Stable Diffusion on your own computer. Provides a browser UI for generating images from text prompts and images. Just enter your text prompt, and see the generated image.

Easiest 1-click way to install and use Stable Diffusion on your own computer. Provides a browser UI for generating images from text prompts and images. Just enter your text prompt, and see the generated image.

Stable Diffusion UI Easiest way to install and use Stable Diffusion on your own computer. No dependencies or technical knowledge required. 1-click ins

Dec 30, 2022

MidJourney is an AI text-to-image service that generates images based on textual prompts. It is often used to create artistic or imaginative images, and is available on Discord and through a web interface here.

MidJourney is an AI text-to-image service that generates images based on textual prompts. It is often used to create artistic or imaginative images, and is available on Discord and through a web interface here.

Midjourney MidJourney is an AI text-to-image service that generates images based on textual prompts. It is often used to create artistic or imaginativ

May 1, 2023

🐼 A cli can automatically compress images with tinypng.com

🐼 A cli can automatically compress images with tinypng.com

easy-tinypng-cli A cli can automatically compress images with tinypng.com. Why When delevoping a website, we often need to compress images to reduce t

Dec 14, 2022

Force dark mode for all web pages.

Dark Mode [WIP] Force dark mode for all web pages. Instalation Enable Epiphany extension. Optional if not done. Download the latest release from the .

Dec 2, 2022

On this page, you can save and load all the awesome books you have and save the name and the author into the local storage. this project uses Javascript to interact with the pages

Awesome Books: refactor to use JavaScript classes In this project, We add the links to the applications into the final project Getting Started if you

Nov 29, 2022

Library to make your web page shareable fast and easy in all the majors social networks.

SocialShareJS This is a simple libray to make your web page shareable fast and easy. Its allow to include the social share link of the major social ne

Jul 24, 2022
Owner
Travis Fischer
My heart is open source 💕 Formerly @amazon, @microsoft
Travis Fischer
A simple scalable color system for designing warm welcoming, caring websites and apps.

Sargam Colors A simple scalable color system for designing warm welcoming, caring websites and apps. Sargam colors are the language of the beauty, the

sargam 6 Nov 17, 2022
Collection of SEO utilities like sitemap, robots.txt, etc. for a Remix Application

Remix SEO Collection of SEO utilities like sitemap, robots.txt, etc. for a Remix Features Generate Sitemap Generate Robots.txt Installation To use it,

Balavishnu V J 128 Dec 21, 2022
The fastest way ⚡️ to create sitemap in your Deno Fresh project 🍋

Fresh SEO ??     Quickly creating sitemaps for your Deno Fresh project. Getting Started Run the setup at the root of your project. deno run

Steven Yung 34 Dec 19, 2022
A social media platform aimed to capture the essence of all popular, existing social media platforms

Social Fuel Reimagining Social Media, step by step ?? About A social media platform aimed to capture the essence of all popular, existing social media

HariHaran 6 Feb 12, 2022
Hackathon for Social Good 2022 and use your superpowers to create a solution for the social good.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Laura Diaz 3 Jun 27, 2022
Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries.

Image Zoom (jQuery) Plugin Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries that is less th

Mario Duarte 8 Aug 3, 2022
Generate social preview images in your Next.js API from Sanity webhooks

sanity-next-social-image-generator Automatically generate social share images using Sanity webhooks, and your Next.js API! Requirements A Next.js appl

Jordan McRae 9 Sep 4, 2022
A simple in-memory time-based cache for both objects and function execution.

What is this? A simple in-memory time-based cache for both objects and function execution. How do I install it? You can install it by using the follow

cadienvan 7 Dec 15, 2022
A simple in-memory key-value cache for function execution, allowing both sync and async operations using the same methods

A simple in-memory key-value cache for function execution, allowing both sync and async operations using the same methods. It provides an invalidation mechanism based both on exact string and regex.

cadienvan 10 Dec 15, 2022