i want to display caregory images in my own module , so i create a module and frontend/templates/category-section.phtml , and this is the code , my problem is the source image is empty ,it returns null in my creating page ,all others properties like this works correctly
i uploaded the image in admin panel and when i click on the a tag it return the category pages with the image correctly but only in my displaying categories and images , the images arent displaying
the images here arent displayed
if i click on any one, the url and image exist here but in new module arent
<?php echo $category->getName() ?>
<section class="section-holder">
<div class="all-categories">
<p class='category-text'>categories</p>
<div class='categories-flex'>
<?php
$categoryHelper = $this->helper('MagentoCatalogHelperCategory');
$outputhelper = $this->helper('MagentoCatalogHelperOutput');
foreach ($categoryHelper->getStoreCategories() as $category) :
?>
<a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>">
<div class='child-category'>
<div>
<img style="background-image: url('<?= $category->getImageUrl(); ?>');" alt="">
</div>
<p> <?php echo $category->getName() ?></p>
</div>
</a>
<?php
endforeach;
?>
</div>
</div>
</section>