Firefox – Save multiple files from Firefox Web Console

firefoxpictures

I want to save multiple image files from the Network tab in Firefox Web Console

Firefox Web Console

I can right-click on a single file and select Save Image As, but multiple selection does not work.

Files downloaded via XHR

Note that the images are downloaded through user interaction and AJAX / XHR calls. So there is no way to use View Page Info -> ** Media** to save the images. Nor do extensions such as Download all images work.

Best Answer

Rather than saving from the Network tab, it would be easier done from Page Info:

  • Right-click the web-page and select "View Page Info"

  • Click on the Media tab which will show all media content (images, videos etc) for the page

  • Select all the items using the Shift or Ctrl keys to select multiple items

  • Click the Save As button.

enter image description here

Alternatively, you may also use a specialized add-on such as Download all Images.


In case that you have images that are retrieved by JavaScript and are not referred-to on the page, a method that does use the Network tab in Firefox is as follows:

  • Right-click any image and select "Save All As HAR"
  • Select a folder (and perhaps file-name). The .har file is a JSON text file.
  • Edit the file so as to :
    • delete all lines not containing "url" (or extract these lines)
    • delete the extra text at the beginning of the lines : "url": "
    • delete the extra text at the end of the lines : ",
  • The result is a text file containing the URLs of all the images
  • Use a download utility that can download a list of files

Writing a script to edit the .har file and then to download the images should not be difficult.

Related Question