    {% if obj != null %}

    <h1>uploaded successfully {{obj.caption}}</h1>
    <img src="{{obj.image.url}}" alt="image" class="img-thumbail">
    {% endif %}  


    {% for i in img %}
  
    <div class="container">
        <div class="row">
          <div class="col">
            <strong>{{i}}</strong>   <br>
             <img src="{{i.image.url}}" height="158px">


          </div>
          
      
        </div>
      </div>
    {% endfor %}

if condition succedded a image is added aedn of the page vertically one after other
but here i want something good