We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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!
The text was updated successfully, but these errors were encountered:
Update FileHelper.php
4b13621
Added `IMAGETYPE_WEBP` #28
Hello, I have added it. Just use "navatech/yii2-roxymce" : "@dev" in your composer.json Thanks for using.
"navatech/yii2-roxymce" : "@dev"
Sorry, something went wrong.
No branches or pull requests
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!
The text was updated successfully, but these errors were encountered: