lgladdy / wordpress-dominant-color

A WordPress plugin to automatically save the dominant colour for an attachment image into post_meta
Apache License 2.0
32 stars 4 forks source link

Class 'ColorThief\ColorThief' not found #8

Open picard102 opened 1 month ago

picard102 commented 1 month ago

I am uploading images to the media library using wp_insert_attachment. It would produce a fatal error saying Class 'ColorThief\ColorThief' not found.

My work around was to give the autoload a more specific directory, and the error went away.

require DIR . '/vendor/autoload.php';