title: how could I create a modal with a image in it and the link of the modal is the image itself (on a smaller version))
body: <p>I want to show some image in a thumbnail gallery in which if you click an image then it will appear larger in a modal.</p>
  
  <p>If i keep the link of the modal as an image then it does not show anything at header or footer other than the close sign in top right corner.</p>
  
  <p>I am using bootstrap. I also want to know if i could replace the <code>img</code> tag to <code>&lt;a&gt;</code> tag to open the modal section. Please help.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;div class="col-lg-3 col-md-4 col-xs-6 thumb"&gt;
          &lt;img id="image-modal" class="img-responsive img-rounded" src="&lt;?php echo base_url();?&gt;img/Desert.jpg" data-target="#myModal" data-toggle="modal" alt=""&gt;
          &lt;div class="modal fade" id="myModal" role="dialog"&gt;
              &lt;div class="modal-dialog"&gt;
                  &lt;!-- Modal content--&gt;
                  &lt;div class="modal-content"&gt;
                      &lt;div class="modal-header"&gt;
                          &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                          &lt;h4 class="modal-title"&gt;Modal Header&lt;/h4&gt;
                      &lt;/div&gt;
                      &lt;div class="modal-body"&gt;
                          &lt;img class="img-responsive" src="&lt;?php echo base_url();?&gt;img/Desert.jpg" alt=""&gt;
                      &lt;/div&gt;
                      &lt;div class="modal-footer"&gt;
                          &lt;p&gt;This is footer&lt;/p&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/LDLM0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LDLM0.png" alt="enter image description here"></a></p>