Getting the featured image in Twig

In Twig

{% if post.featured_images.count > 0 %}
   {% set thumb = post.featured_images[0] %}
   <img class="card-img-top img-responsive" src="{{ thumb.path }}" alt="{{ thumb.file_name }}">
{% endif %}

All available attributes

"id" => "21"
"disk_name" => "c2hfMDAyNjIucG5nIWYyZWFhZTAzNWU4OGFhNDM1ZjAyOGQzNDU0YmE1YjFk.png"
"file_name" => "sh_00262.png"
"file_size" => "9935"
"content_type" => "image/png"
"title" => null
"description" => null
"field" => "featured_images"
"attachment_id" => "69"
"attachment_type" => "RainLab\Blog\Models\Post"
"is_public" => "1"
"sort_order" => "1"
"created_at" => "2018-09-05 13:39:49"
"updated_at" => "2018-09-05 13:39:49"
Last update: Tue, 13 Sep 2022 14:32:15