D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
3023066
/
task
/
3023066
/
cwd
/
www
/
vendor
/
spatie
/
image-optimizer
/
src
/
Optimizers
/
Filename :
Cwebp.php
back
Copy
<?php namespace Spatie\ImageOptimizer\Optimizers; use Spatie\ImageOptimizer\Image; class Cwebp extends BaseOptimizer { public $binaryName = 'cwebp'; public function canHandle(Image $image): bool { return $image->mime() === 'image/webp'; } public function getCommand(): string { $optionString = implode(' ', $this->options); return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}" .' '.escapeshellarg($this->imagePath) .' -o '.escapeshellarg($this->imagePath); } }