Skip to content

Instantly share code, notes, and snippets.

View danpoynor's full-sized avatar
🌏
Howdy World!

Dan Poynor danpoynor

🌏
Howdy World!
View GitHub Profile
@danpoynor
danpoynor / regenerate-thumbnails.js
Created June 20, 2023 16:03 — forked from daveyjones/regenerate-thumbnails.js
Insanely fast multi-core Node.js script for generating (or regenerating) custom WordPress image sizes (e.g. thumbnails) for very large media libraries
// Your server must have wp-cli installed (http://wp-cli.org/)
var async = require("async");
var exec = require("child_process").exec;
var cores = 32; // Adjust the number of cores to match your environment
var total = 0;
var finished = 0;
var q = async.queue(function(task, callback) {