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

generateThumbs being called on non-image types #2

Closed
jeffgreco13 opened this issue Jun 22, 2022 · 1 comment
Closed

generateThumbs being called on non-image types #2

jeffgreco13 opened this issue Jun 22, 2022 · 1 comment

Comments

@jeffgreco13
Copy link

jeffgreco13 commented Jun 22, 2022

Within the created closure on the Media model, self::generateThumbs($media) is being called even if the mimetype is not an image (ie. PDF). This causes a fatal error with Intervention. Possible fix:

                static::created(function (Media $media) {
			$media->refresh();
			if (str($media->type)->contains("image")) {
				self::generateThumbs($media);
			}
		});
@awcodes awcodes mentioned this issue Jun 22, 2022
@awcodes
Copy link
Owner

awcodes commented Jun 22, 2022

This has been released in https://github.com/awcodes/filament-curator/releases/tag/v0.2.5

@awcodes awcodes closed this as completed Jun 22, 2022
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