<% if object.present? && object.file.present? %>

  <% if object.url.present? %>
    <%= link_to object.url, class: 'th radius' do %>
      <%= image_tag object.file.size_1024x640.url, alt: '' %>
    <% end %>

  <% else %>
    <%= image_tag object.file.size_1024x640.url, alt: '' %>
  <% end %>

  <% if object.caption.present? %>
    <div class="text-center">
      <%= object.caption.html_safe %>
    </div>
  <% end %>
<% end %>

<% if object.present? && object.file.present? %>

  <% if object.url.present? %>
    <%= link_to object.url do %>
      <%= image_tag object.file.size_1024x640.url, alt: '', class: 'img-fluid' %>
    <% end %>

  <% else %>
    <%= image_tag object.file.size_1024x640.url, alt: '', class: 'img-fluid' %>
  <% end %>

  <% if object.caption.present? %>
    <div class="text-center">
      <%= object.caption.html_safe %>
    </div>
  <% end %>
<% end %>

Fix the flexible content image preview.
Fix the flexible content image preview.
