Custom Image Attribute doesn't work

Permalink
Hi All

I have use as below for generate image thumbnail :
$imgHelper = Loader::helper('image');
$logo = $imgHelper->getThumbnail($page->getAttribute('logo'), 100, 50);

it return empty response, but actually it has a value and it is work in concrete 5.7.13.
it doesn't get value after update concrete to 8.x.

ANY SOLUTION PLEASE ?

Thanks in advance.

View Replies:
katalysis replied on at Permalink Reply
katalysis
I'd normally use the new responsive thumbnails like this...

<?php 
$thumbnail = File::getByID($page->getAttribute('thumbnail'));
$image = \Concrete\Core\File\Image\Thumbnail\Type\Type::getByHandle('large');
if (is_object($thumbnail)) {
     $src = $thumbnail->getThumbnailURL($image->getBaseVersion());
?>
<img src="<?php echo $src; ?>" alt="<?php echo $title ?>">
<?php } ?>