wget - download external images

5,943

You need the -H (resp. --span-hosts) parameter. It enables downloading of linked resources that are hosted at different hosts/domains.

In addition you may block specific domains with --exclude-domains (Example: --exclude-domains=example.com,example.org)

Share:
5,943

Related videos on Youtube

Sfisioza
Author by

Sfisioza

I'm a regular javascript developer :) Regular developer, not regular javascript.

Updated on September 18, 2022

Comments

  • Sfisioza
    Sfisioza almost 2 years

    I'm using wget -A to download images from a page.
    This works fine, when images are hosted on the same domain as the page.
    But this won't download images hotlinked from other pages (e.g. imageshack)

    How can I download the external images as well using wget or similar tool?

  • Sridhar Sarnobat
    Sridhar Sarnobat about 10 years
    The first sentence solves the problem as per the post, in my opinion. Someone should mark this answer as correct.