Closed jaroSK closed 5 years ago
Ahoj Jaro, skus to zdebugovat viac do hlbky, my s tym nemame problemy, mame nad tym spravene vlastne classy ale pouzivame to nejak takto:
Hi Jaro, try to check in more depth your debug of variables and function outputs, anyway check my code below, which we are using as part of wrapper of fly images plugin
Hey @jaroSK and @horecny sounds like the problem exists outside the plugin, so I'm closing this issue!
It looks like that some images are not created in fly-images directory. Then this if statement in class-core.php doesn't return array with image src.
// Check if file exsists
if ( file_exists( $fly_file_path ) ) {
$image_size = getimagesize( $fly_file_path );
if ( ! empty( $image_size ) ) {
return array(
'src' => $this->get_fly_path( $fly_file_path ),
'width' => $image_size[0],
'height' => $image_size[1],
);
} else {
return array();
}
}
Are there any restrictions on image size, image extensions or characters in image name?
I'm using this code to display photos of contact persons:
Most of the images are displayed correctly, as you can see here, but on some pages there is an error - Notice: Undefined index: src on line 315 as you can see here. How to edit code to work for all images?