Skip to content
New issue

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

Add IMAGETYPE_WEBP #28

Open
websitesa-jefferson opened this issue Dec 31, 2022 · 1 comment
Open

Add IMAGETYPE_WEBP #28

websitesa-jefferson opened this issue Dec 31, 2022 · 1 comment

Comments

@websitesa-jefferson
Copy link

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 added a commit that referenced this issue Jan 5, 2023
Added `IMAGETYPE_WEBP` #28
@phuongdev89
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants