PluginProbe
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress / 3.1.0
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress v3.1.0
4.1.2 4.1.1 4.1.0 4.0.1 4.0.0 3.3.1 3.3.0 trunk 1.0.0 2.0.0 2.1.0 3.0.0 3.1.0 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8
quickwebp / includes / vendor / intervention / image / src / Intervention / Image / Commands / ResponseCommand.php

ResponseCommand.php in QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress 3.1.0, at includes/vendor/intervention/image/src/Intervention/Image/Commands/ResponseCommand.php

27 lines 560 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Intervention\Image\Commands;
4
5 use Intervention\Image\Response;
6
7 class ResponseCommand extends AbstractCommand
8 {
9 /**
10 * Builds HTTP response from given image
11 *
12 * @param \Intervention\Image\Image $image
13 * @return boolean
14 */
15 public function execute($image)
16 {
17 $format = $this->argument(0)->value();
18 $quality = $this->argument(1)->between(0, 100)->value();
19
20 $response = new Response($image, $format, $quality);
21
22 $this->setOutput($response->make());
23
24 return true;
25 }
26 }
27