Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Firefox was loading very slow, so I decided to use wget to save HTML files.I used the following command,


The files have been saved in my home folder.But I don't know where the images are stored.I need them to use in Anki.

So where are the images stored?

share|improve this question
This article explains the options and how they are useful. – Wilf Nov 1 '14 at 13:34
up vote 17 down vote accepted

I prefer to use --page-requisites (-p for short) instead of -r here as it downloads everything the page needs to display but no other pages, and I don't have to think about what kind of files I want.

Actually I'm usually using something like

wget -E -H -k -p

This means:

  • -E: Append .html to the file name if it is an HTML file but doesn't end in .html or similar
  • -H: Download files from other hosts, too
  • -k: After downloading convert any link in it so they point to the downloaded files
  • -p: Download anything the page needs for proper offline viewing
share|improve this answer
I came here looking for -H, and was happy to learn about -E and -k too. Thanks! – crclayton Mar 27 at 4:06

using the -r parameter should enable wget to download the whole folder, including your images.

wget -r
share|improve this answer

Wget simply downloads the HTML file of the page, not the images in the page, as the images in the HTML file of the page are written as URLs. To do what you want, use the -R (recursive), the -A option with the image file suffixes, the --no-parent option, to make it not ascend, and the --level option with 1.

Specifically wget -R -A .jpg,.png,.gif --no-parent --level <url>

Even better, most browsers have methods for saving pages for offline viewing.

share|improve this answer

Downloading the image files separately as well

I think this command could get you started.

 wget -r -P /save/location -A jpeg,jpg,bmp,gif,png

It allows you to specify the location to save the images and which types of files you wants. Maybe downloading the images as such is easier.


-r enables recursive retrieval. See Recursive Download for more information.

-P sets the directory prefix where all files and directories are saved to.

-A sets a whitelist for retrieving only certain file types. Strings and patterns are accepted, and both can be used in a comma separated list (as seen above). See Types of Files for more information.

Copying the image files from your folder

I have noticed that the website uses PNG image files. You can just copy those from your folder. This should be run in the folder where you stored the webpage.

find . -name "*.png" -exec cp '{}' ./some_dir/somewhere/ \;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.