I'm using this code but I get only an alert, I would like instead to have an img src link from this code:
(function($){
var albumID = 'my albumID';
var albumAPI = "https://api.imgur.com/3/album/" + albumID + "/images";
$.ajax({
url: albumAPI,
headers:{
'Authorization':'Client-ID xxxxxxxxxxxxx'
},
type: 'GET',
dataType: 'json',
success: function(data) {
alert(data.data[0].link);
},
error: function() { console.log("ERRORZ"); }
});
})(jQuery);
because I would like use images uploaded on my imgur album on my website, for a gallery.
I tried with echo, echo '<img src="'data'">';
etc, but nothing..