Popover image now uses picture with media attributes to load sm, md or large image based on screen width.

This commit is contained in:
2019-04-16 16:53:15 +02:00
parent 5d72959742
commit 84886313bb

View File

@@ -2,7 +2,13 @@
<div class="popover">
<div class="popover-content" @click="hidePopover" v-touch:swipe.left="backwards" v-touch:swipe.right="forwards">
<div class="image-container">
<img :src="album[index].url" />
<picture>
<source :srcset="album[index].url"
media="(min-width: 1200px)">
<source :srcset="album[index].url.replace('_lg.', '_md.')"
media="(min-width: 650px)">
<img :src="album[index].url.replace('_lg.', '_sm.')" />
</picture>
<!-- <div class="other-elements">
<p>There is something here</p>