As I work on downloading and resizing an image to fit into my design by adjusting the width and height, I encounter a question about creating a popover when hovering over the full image. Specifically, do I have to download the image again for this purpose? This dilemma arose as I came across a suggestion that seemed to imply so: Bootstrap popover, image as content.
Here is how my jade
code appears:
img#art.img-responsive(style='margin-bottom:10%')
To update the image source dynamically, I use the following code snippet:
if (questionMap[questionOrder[number - 1]].type === 'ART') {
$('#art').attr('src', 'http://' + questions.host + '/image/' + questionMap[questionOrder[number - 1]].src)
}
Now, in relation to adding the same source attribute to the popover code and potentially downloading the image a second time, are there alternative methods or workarounds available? Furthermore, considering the possibility of including the same image twice on a page, would it lead to the image being downloaded twice (assuming server-side caching is enabled)?