working, images broken

This commit is contained in:
2025-06-23 04:08:45 -05:00
parent 2bb7a29141
commit 23fee50a77
7 changed files with 135 additions and 79 deletions

View File

@ -154,10 +154,16 @@
{% endif %}
<a href="{{ url_for('plant.detail', uuid_val=plant.uuid) }}">
<img src="{{ generate_image_url(featured) }}"
class="card-img-top"
style="height:200px;object-fit:cover;"
alt="Image for {{ plant.common_name.name }}">
{# pick featured → first media if no explicit featured #}
{% set featured = plant.featured_media %}
{% if not featured and plant.media %}
{% set featured = plant.media[0] %}
{% endif %}
<img
src="{{ generate_image_url(featured) }}"
class="card-img-top"
style="height:200px;object-fit:cover;"
alt="Image for {{ plant.common_name.name }}">
</a>
<div class="card-body d-flex flex-column">