Skip to content

Class 'Timmy\Image' not found when using v1.0 #60

@jeroenbraspenning

Description

@jeroenbraspenning

Today i gave the v1.0 a spin but i get the following error:
Fatal error: Uncaught Error: Class 'Timmy\Image' not found in /var/www/html/wp-content/plugins/timmy-1.0.0/lib/Timmy.php:161 Stack trace: #0 /var/www/html/wp-content/themes/yk/template-home.php(10): Timmy\Timmy::get_image(260, 'nocrop') #1 /var/www/html/wp-includes/template-loader.php(106): include('/var/www/html/w...') #2 /var/www/html/wp-blog-header.php(19): require_once('/var/www/html/w...') #3 /var/www/html/index.php(17): require('/var/www/html/w...') #4 {main} thrown in /var/www/html/wp-content/plugins/timmy-1.0.0/lib/Timmy.php on line 161

I installed Timmy as a plugin without composer and initialized Timmy (simplified) as follows:

use Timmy\Timmy;
Timmy::init();
$image = Timmy::get_image(260, 'nocrop');

When taking a look at Timmy.php is see the following:

$class = apply_filters( 'timmy/image/class', Image::class );
$size_array = $size;

if ( is_string( $size ) ) {
if ( in_array( $size, [ 'full', 'original' ], true ) ) {
	$size_array = [];
} else {
	$size_array = Helper::get_image_size( $size );
}
}
$image = $class::build( $attachment, $size_array );

The last line is line 161

Is there anything else i can try to debug this issue?

Timmy version: 1.0
Timber version: 1.22.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions