Official migration CLI
For projects with multiple files, use the official local CLI. The default command is a dry run; --write changes only verified safe patterns and --check provides a non-writing CI gate.
npx placeholder-photo-migrate .
npx placeholder-photo-migrate . --write
npx placeholder-photo-migrate . --checkAmbiguous findings stay unchanged for manual review. Read the migration CLI guide.
Quick migration
Only the hostname changes.
Common drop-in patterns
/600Square dimensions — compatible/300x200Width × height — compatible/600/92c952Background colour — compatible/600/92c952/ffffffBackground and text colour — compatible?text=Hello+WorldCustom URL-encoded text — compatible.png .jpg .jpeg .gif .webpExplicit raster formats — compatible when the live format is available3- or 6-digit hexUppercase and lowercase accepted and normalizedtrailing slashAcceptedExamples
OLD https://via.placeholder.com/300x200/000000/ffffff?text=Hello+World
NEW https://placeholder.photo/300x200/000000/ffffff?text=Hello+World
OLD https://via.placeholder.com/300x150/a51c30/ffffff.png
NEW https://placeholder.photo/300x150/a51c30/ffffff.pngIntentional differences
Placeholder.photo is an independent implementation, not a copy of the former service. Exact font metrics and antialiasing may differ, and every normal public image carries the subtle placeholder.photo watermark. Invalid or unsafe values receive a bounded branded error response. GIF output is a static image rather than an animation.
Stability and storage
Legacy paths enter the same normalized, validated and versioned rendering pipeline as modern URLs. They use the same deterministic cache, security limits and long-term compatibility policy. The official API identity remains https://placeholder.photo/… regardless of the interchangeable storage backend used for generated derivatives.