When using href to specify remote content for a modal method, Bootstrap uses the jQuery download method to retrieve the content, and then binds the extracted content to the modal body element. In short, this only makes sense when the deleted content (href value) loads HTML or text.
It is expected that you see, as well as what happens if you open the gif file in a text editor and simply paste it into the HTML tag.
In order for it to work the way you need, href must point to an HTML document containing an <img> tag that refers to the image you want in modal mode.
source share