JavaScript Use JS to get at blob-ified image listed in Chrome DevTools

  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    Image Javascript
AI Thread Summary
JavaScript cannot directly access the binary data of a "blob" type image resource that has been loaded onto a web page unless it was originally sourced from a data URI or Base64 format. If the image is visible in the browser but the URL is no longer functional due to server expiration, users cannot retrieve the image data through JavaScript. For those needing the image, a suggested workaround is to take a screenshot. Additionally, Firefox developer tools provide an option to download the image directly from the Response tab in the Network section, allowing users to save the image without relying on the original URL.
Swamp Thing
Insights Author
Messages
1,032
Reaction score
770
Can JavaScript access a "blob" type image resource that has been loaded as part of a web page, and is then visible in the Networks tab as well as under Application > Frames > Image ... ?

In the scenario I am looking at, the page is open, and the image is visible in the browser to the user. It is also available for previewing in DevTools... but the URL won't work, maybe because the server expires it soon after page load.

So I would like to get the image data in say Base64 format or in Data URI format without needing to request the URL from the server. This I would like to do by pasting code into the console.
 
Technology news on Phys.org
Swamp Thing said:
Can JavaScript access a "blob" type image resource that has been loaded as part of a web page, and is then visible in the Networks tab as well as under Application > Frames > Image ... ?

No, there is no access to the binary data forming an img from JavaScript (unless that image was originally loaded from a dataUri or Base64 src of course).

If you are intent on violating the copyright owners rights then take a screen grab. Alternatively, FireFox developer tools allows you to download the image from the Response tab in Network rather than just preview it.
 
  • Like
Likes Swamp Thing
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top