PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.2.3.1
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.2.3.1
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / classes / Avif / IIS.php

IIS.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.2.3.1, at classes/Avif/IIS.php

33 lines 707 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 declare(strict_types=1);
3
4 namespace Imagify\Avif;
5
6 use Imagify\WriteFile\AbstractIISDirConfFile;
7
8 /**
9 * Add and remove contents to the web.config file to display AVIF images on the site.
10 */
11 class IIS extends AbstractIISDirConfFile {
12
13 /**
14 * Name of the tag used as block delemiter.
15 *
16 * @var string
17 */
18 const TAG_NAME = 'Imagify: avif file type';
19
20 /**
21 * Get unfiltered new contents to write into the file.
22 *
23 * @return array
24 */
25 protected function get_raw_new_contents() {
26 return trim( '
27 <!-- @parent /configuration/system.webServer -->
28 <staticContent name="' . esc_attr( static::TAG_NAME ) . ' 1">
29 <mimeMap fileExtension=".avif" mimeType="image/avif" />
30 </staticContent>' );
31 }
32 }
33