Hey, how to get a thumb image from a next or previous page when the thumb was not created yet?
<?php if($page->hasPrevVisible() && !empty($page->prevVisible()->image_teaser())): ?>
<a href="<?php echo $page->prevVisible()->url() ?>">
<?php echo thumb($page->prevVisible()->image($page->prevVisible()->image_teaser()), array('width' => 240, 'height' => 135, 'crop' => true)); ?>
</a>
<?php endif ?>
I get the following error:
// check for a valid image
if(!$this->source->exists() || $this->source->type() != ‘image’) {
throw new Error(‘The given image is invalid’, static::ERROR_INVALID_IMAGE);
}
thanks!