I was trying to get all the images from a webpage and display them in the console log Code below:
function img_find()
{
var imgs = document.getElementsByTagName("img");
var imgSrcs = [];
for (var i = 0; i < imgs.length; i++){
imgSrcs.push(imgs[i].src);
console.log(imgs[i].src);
}`
return imgSrcs;
}
But now I just want to get gif images only. How can I do that?