Skip to content

Instantly share code, notes, and snippets.

@mishterk
Last active July 14, 2022 04:25
Show Gist options
  • Save mishterk/d8133d0433c2cd25c23470b235c7a59e to your computer and use it in GitHub Desktop.
Save mishterk/d8133d0433c2cd25c23470b235c7a59e to your computer and use it in GitHub Desktop.
Replace all attachment images with kitten placeholders...
<?php
add_filter( 'wp_get_attachment_image_src', function ( $image ) {
$image[0] = "https://placekitten.com/$image[1]/$image[2]";
return $image;
}, 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment