lucaspulliese / vue-cool-lightbox

Vue.js lightbox inspired by fancybox.
https://vue-cool-lightbox.lucaspulliese.com
341 stars 54 forks source link

Base64 data for image src #64

Closed thehovdev closed 3 years ago

thehovdev commented 3 years ago

is this possible in this package ?

i use this code but it does not work

<CoolLightBox :items="photos" :index="index" srcName="image" srcMediaType="data:image/jpeg;base64" @close="index = null">

winfieldblum commented 3 years ago

I believe the srcMediaType is used for to switch between images/video and iframes but I could be wrong

lucaspulliese commented 3 years ago

Hi @thehovdev!

Yep, but it's not going to work in that way, It's what @changefox said, that prop is for src items, and it's, for example, when you have an url which is an PDF but it's not possible to detect the extension.

Check this example, you just need to add the base64 image to the src item.