I'm sorry for the first question and the unfamiliar text.
I want to resize the image using the variant method.
If i use the variant method, it will not be resized and the image will not be displayed.

Corresponding source code

<% = image_tag tweet.image.variant (resize: '500x500') if tweet.image.attached?%>
      <span><% = image_tag'arrow_top.png'%></span>
          <% = link_to'Details', tweet_path (tweet.id), method:: get%>
        <% if user_signed_in?&&current_user.id == tweet.user_id%>
          <% = link_to'edit', edit_tweet_path (tweet.id), method:: get%>
          <% = link_to'Delete', tweet_path (tweet.id), method :: delete%>
        <% end%>
    <p><% = tweet.title%></p>
      <% = tweet.text%>
        <span>Posted by</span><% = tweet.user.nickname%>
What I tried

I searched google search for cases that are not displayed, but I could not find a case that corresponds to this time.

Supplementary information (FW/tool version, etc.)

I am using ruby ​​on rails.

In this way, the image disappears.
I would be grateful if anyone could give me some advice.
Thanks for your cooperation.

  • Answer # 1

    To tweet model

    has_one_attached: image

    Installation of minimagick
    Have you done that?

    This article may be helpful.