category images not showing
See original GitHub issue{% category_tree depth=2 as tree_categories %}
{% for category, info in tree_categories %}
{% if info.level == 0 %}
<li><a href="{{ category.get_absolute_url }}"><i
class="fa fa-{{ category.icon }} dropdown-menu-category-icon"></i>{{ category.name }} </a>
{% if info.has_children %}
. . .
{% category_tree depth=1 parent=category as sub_categories %}
{% for sub_category, info in sub_categories %}
<div class="col-md-4">
<a href="{{ sub_category.get_absolute_url }}">
<h5 class="dropdown-menu-category-title">
{#here only the first category is shown with image, the rest is without image#}
{% thumbnail sub_category.image "100x100" upscale=False as thumb %}
<img
src="{{ thumb.url }}"
alt="{{ sub_category.name }}"
title="{{ sub_category.name }}"
/>
{% endthumbnail %}
{{ sub_category.name }}
</h5>
</a>
<ul class="dropdown-menu-category-list">
{% category_tree depth=1 parent=sub_category as sub_sub_categories %}
{% for ss_category, info in sub_sub_categories %}
<li>
<a href="{{ ss_category.get_absolute_url }}">{{ ss_category.name }}</a>
<p>{{ ss_category.description|safe }}</p>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
...
{% if info.level == 0 %} {# Here image is shown #}
{% thumbnail category.image "300x300" upscale=False as thumb %}
<img class="dropdown-menu-category-section-theme-img"
src="{{ thumb.url }}"
alt="{{ category.name }}" title="{{ category.name }}"
style="right: 10px;"/>
{% endthumbnail %}
{% endif %}
</div>
</div>
{% endif %}
</li>
{% endif %}
{% endfor %} ```
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Category Image not showing | WordPress.org
After editing the text of a category, the category image stopped displaying. It shows in the category edit section but not on the...
Read more >Pictures / Images not showing in category page after updating ...
A common issue is that Magento is looking for the pictures in the old cache files that are missing after the upgrade as...
Read more >Category images are not displaying in WordPress
I am able to get the category name and description but I am not getting the category image. I tried the below code....
Read more >Product Category Images Not Showing in the Front - Crocoblock
In this quick fix, we shed the light on two methods you can use to output the WooCommerce product category thumbnail in the...
Read more >WordPress Featured Image Not Showing Properly (Or Not At All)
To edit featured images in WordPress, open a post and scroll to the Featured Images section in the Post Settings panel. Click the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
any updates here? I’m trying django-oscar with lightsail + nginx and i can’t also see the images. Any help here?
Thanks.
i’m using django-oscar, and i faced the same issue. i installed sorl thumbnail 12.4a1, but it didn’t fixed the problem. any ideas? or new solutions? thanks a lot.