We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5dce66 commit 562228bCopy full SHA for 562228b
.travis.yml
lib/ImageResize.php
@@ -111,13 +111,16 @@ public function __construct($filename)
111
112
$finfo = finfo_open(FILEINFO_MIME_TYPE);
113
$checkWebp = false;
114
- if (strstr(finfo_file($finfo, $filename), 'image') === false || version_compare(PHP_VERSION, '7.1.0', '<')) {
115
- if (strstr(file_get_contents($filename), 'WEBPVP8') !== false) {
+ if (strstr(finfo_file($finfo, $filename), 'image') === false) {
+ if (version_compare(PHP_VERSION, '7.0.0', '<=') && strstr(file_get_contents($filename), 'WEBPVP8') !== false) {
116
$checkWebp = true;
117
$this->source_type = IMAGETYPE_WEBP;
118
} else {
119
throw new ImageResizeException('Unsupported file type');
120
}
121
+ } elseif(strstr(finfo_file($finfo, $filename), 'image/webp')) {
122
+ $checkWebp = true;
123
+ $this->source_type = IMAGETYPE_WEBP;
124
125
126
if (!$image_info = getimagesize($filename, $this->source_info)) {
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments