<% milestone = first_milestone_with_image(investment) %>

<% if milestone&.image.present? %>
  <%= image_tag milestone.image_url(:large), alt: milestone.image.title %>
<% elsif investment.image.present? %>
  <%= image_tag investment.image_url(:large), alt: investment.image.title %>
<% else %>
  <%= image_tag "budget_execution_no_image.jpg", alt: investment.title %>
<% end %>
