Skip to content

Commit

Permalink
Show base64 of images to prevent caching
Browse files Browse the repository at this point in the history
  • Loading branch information
sebarious committed Jun 7, 2019
1 parent 7eadef4 commit 52e1763
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-medialibrary",
"version": "1.0.10",
"version": "1.0.11",
"description": "A Vue component for the mdixon18/media-library",
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="media-library-field__selected__inner">
<div class="media-library-field__selected__inner__img" v-if="file.collection_name == 'images'" @click="showManager = true">
<div class="media-library-field__selected__inner__img__frame">
<div class="media-library-field__selected__inner__img__frame__image" :style="`background-image: url('${file.fullUrl}');`"></div>
<div class="media-library-field__selected__inner__img__frame__image" :style="`background-image: url('${file.dataUrl}');`"></div>
</div>

<div class="media-library-field__selected__inner__img__edit">
Expand Down
4 changes: 2 additions & 2 deletions src/components/Manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
:class="{'grid-item--active': store.images.selected.indexOf(m.id) > -1}"
@click="selectManual('images', m.id)"
>
<div class="grid-item__inner" :style="`background: url('${m.fullUrl}'); background-repeat: no-repeat; background-size: cover;`"></div>
<div class="grid-item__inner" :style="`background: url('${m.dataUrl}'); background-repeat: no-repeat; background-size: cover;`"></div>
</div>
</div>
<div class="media-library__manager__content__images__grid__files" v-else-if="type == 'files'">
Expand Down Expand Up @@ -111,7 +111,7 @@
<div v-else>
<div class="media-library__manager__content__info__section">
<div class="media-library__manager__content__info__image">
<img v-if="type == 'images'" :src="openFile.fullUrl" style="width: auto; height: auto; max-width: 150px; max-height: 150px;">
<img v-if="type == 'images'" :src="openFile.dataUrl" style="width: auto; height: auto; max-width: 150px; max-height: 150px;">
</div>
<span class="media-library__manager__content__info__text" v-html="openFile.file_name" style="text-overflow: ellipsis; white-space: nowrap; overflow: hidden;" />
<span class="media-library__manager__content__info__text media-library__manager__content__info__text--secondary" v-if="type == 'images'">Dimensions: {{ openFile.image.width }} × {{ openFile.image.height }}</span>
Expand Down

0 comments on commit 52e1763

Please sign in to comment.