Do not display post images on front page

Try this <?php add_filter(‘the_content’,’wpi_image_content_filter’,11); function wpi_image_content_filter($content){ if (is_home() || is_front_page()){ $content = preg_replace(“/<img[^>]+\>/i”, “”, $content); } return $content; } ?> Place in your functions.php file, call up your the_content() like normal. This will allow you to still have a feature image, but remove all images from main page. If you want to remove them from … Read more

WebP Fallback for Inline Background Image in Style Attribute

Here’s couple of wild ideas which you could try, if you’re feeling adventurous. 1) Write some conditional logic with $_SERVER to detect if the user’s browser is the right type and high enough version, that would probably support the WebP format. Try using $_SERVER [‘HTTP_USER_AGENT’] and see also https://stackoverflow.com/questions/13252603/how-does-http-user-agent-work 2) Add the WebP and fallback … Read more