born05 / craft-colorextractor

Extract colors from image assets in Craft CMS.
MIT License
2 stars 5 forks source link

Be more resilient to ColorThief exceptions #7

Closed nstCactus closed 2 years ago

nstCactus commented 2 years ago

I had a problem with the queue job that extracts color from all images. One of my images was not supported by the color-thief package, which resulted in an exception being thrown (Unable to compute the color palette of a blank or transparent image) and the queue job stopping without processing other images.

This fix catches and logs exceptions and returns a fallback value.

roelvanhintum commented 2 years ago

Thanks! Released in 3.0.0-beta.2

codyjames commented 1 year ago

@roelvanhintum Any way this fix could be added to the Craft 3 version? I'd really appreciate it!

roelvanhintum commented 1 year ago

@codyjames, just released in 2.1.1

codyjames commented 1 year ago

@roelvanhintum Thank you, I really appreciate it!