V
V
Vitaly2016-10-20 15:57:07
JavaScript
Vitaly, 2016-10-20 15:57:07

js, saving loaded image?

Hello. The essence of the question is banal, for the parser it is often necessary to save an ominous picture, and it is very annoying to do this through a screenshot. Naturally, for the next click on the link, the result of the image will be completely different. If we see img base64, there are no questions, but what if the image is downloaded from a link? Is it possible to pull it through the browser api somehow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2016-10-20
@vshvydky

stackoverflow.com/questions/17527713/force-browser...

var link = document.createElement('a');
link.href = 'images.jpg';
link.download = true;
document.body.appendChild(link);
link.click();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question