Adding Webp support to Revolution Slider
问题 I want Revolution Slider to use webp images if there is any available but it has no support for webp. How can i make this work ? 回答1: Open /wp-content/plugins/revslider/includes/output.class.php in a text editor. Search for if($img_size !== 'full' && $cur_img_id !== false && !empty($cur_img_id)){ $_urlImage = wp_get_attachment_image_src($cur_img_id, $img_size); $urlImage = ($_urlImage !== false) ? $_urlImage[0] : $urlImage; } inside the function get_html_layer() . Add if ( !empty($urlImage) &