phuongdev89 / yii2-roxymce

MIT License
12 stars 15 forks source link

Add IMAGETYPE_WEBP #28

Open websitesa-jefferson opened 1 year ago

websitesa-jefferson commented 1 year ago

good afternoon, could you add support for filepreview for webp?

public static function filePreview($path) { $allowedTypes = array( IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF, IMAGETYPE_WEBP, ); $detectedType = exif_imagetype($path); if (in_array($detectedType, $allowedTypes)) { return self::fileUrl($path); } else { return self::fileIcon($path, true); } }

thankful!

phuongdev89 commented 1 year ago

Hello, I have added it. Just use "navatech/yii2-roxymce" : "@dev" in your composer.json Thanks for using.