wp-performant-media.php

/*
Plugin Name: WP Performant Media
Description: Simple lazy-loading images with an elegant focus effect.
Plugin URI: https://github.com/pixelcollective/wp-performant-media
Author: Tiny Pixel Collective, Kelly Mears 
Version: 1.0.0
Author URI: https://tinypixel.io
*/

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

add_action('wp_enqueue_scripts', function () {
    wp_enqueue_script( 'wp-performant-media.js', plugins_url( 'dist/wp-performant-media.js',  __FILE__ ), [], '1.0.0', true );
    wp_enqueue_style( 'wp-performant-media.css', plugins_url( 'dist/wp-performant-media.css',  __FILE__ ), [], '1.0.0' );
});

add_filter('the_content', function ($content) {
	$content = preg_replace( "https://tinypixel-c91a.kxcdn.com//i", '', $content );
	$content = preg_replace( 'https://tinypixel-c91a.kxcdn.com//i', '', $content );
	$content = preg_replace( '//i', '', $content);
	return $content;
});