Good evening, I'm using this plugin: link
Here's JSFIDDLE: link
Follow the code:
HTML:
<button type="button" class="btn btn-primary">Abrir imagem</button>
JS:
$("button[class='btn btn-primary']").click(function(e) {
var imagem = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAM ... etc'
event.preventDefault();
$(this).ekkoLightbox({
//Como carregar imagem a partir daqui
});
});
Is it possible to load image from javascript?