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

Cannot assign null to property nystudio107\imageoptimize\models\OptimizedImage::$lightness of type int #345

Closed
Mathias-Syversen opened this issue Jun 10, 2022 · 2 comments
Labels

Comments

@Mathias-Syversen
Copy link

When generating transform the queue job fails, giving the error:
Cannot assign null to property nystudio107\imageoptimize\models\OptimizedImage::$lightness of type int

Additionally, I get no output in the terminal if I try to generate transforms there, so I cant narrow down the actual image throwing the error. It failed on 35% this time, so I suspect there are some images throwing this error, not all.

SVG and GIF optimizers are not activated, I generate webp with cwebp locally, have been working fine until the craft 4 upgrade.

Versions

  • Plugin version: 4.0.0-beta.3
  • Craft version: 4.0.4
@khalwat
Copy link
Contributor

khalwat commented Jun 23, 2022

Should be an easy fix, thank you

khalwat added a commit that referenced this issue Jun 27, 2022
@khalwat
Copy link
Contributor

khalwat commented Jun 27, 2022

Addressed in: 3ac976f

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-imageoptimize": "dev-develop-v4 as 4.0.0-beta.4”,

Then do a composer clear-cache && composer update

@khalwat khalwat closed this as completed Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants