I have loaded the category and sub-category, now I need to load image as well but I’m not sure how to do that.
Below is the code I have used:
In block file:
public function getStoreCategories($sorted = false, $asCollection = false, $toLoad = true)
{
return $this->_categoryHelper->getStoreCategories($sorted , $asCollection, $toLoad);
}
public function getCategoryById($categoryId)
{
return $this->_categoryRepository->get($categoryId);
}
In phtm file:
Can you please help me with this?