lib/blobfolio/common/image.php
public static function to_webp(string $from, $to=null, $cwebp=null, $gif2webp=null, bool $refresh=false) {
		// Try binaries first, fallback to GD.
		return (
			static::to_webp_binary($from, $to, $cwebp, $gif2webp, $refresh) ||
			static::to_webp_gd($from, $to, $refresh)
		);
	}
public static function to_webp(string $from, $to=null, $cwebp=null, $gif2webp=null, bool $refresh=false) {
		// Try binaries first, fallback to GD.
		return (
			static::to_webp_binary($from, $to, $cwebp, $gif2webp, $refresh) ||
			static::to_webp_gd($from, $to, $refresh)
		);
	}
public static function to_webp ( string $ from , $ to = null , $ cwebp = null , $ gif2webp = null , bool $ refresh = false ) { // Try binaries first, fallback to GD. return ( static :: to_webp_binary ( $ from , $ to , $ cwebp , $ gif2webp , $ refresh ) || static :: to_webp_gd ( $ from , $ to , $ refresh ) ) ; }
Generate WebP From Source

This is a wrapper for the more specific GD and Binary methods
to generate a WebP sister file.

PHP isn't known for its performance, so the binaries are
preferred when available.

@param string $from Source file.
@param string $to Output file.
@param string $cwebp Path to cwebp.
@param string $gif2webp Path to gif2webp.
@param bool $refresh Recreate it.
@return bool True/false.
Generate WebP From Source