How can I extract images from a web page?

Author :

React :

Comment

Want to extract images from the web, but don't know how? Don't worry, there are some very simple methods for retrieving a specific image or saving an entire page.

In this article, we explain how to extract images from a web page. Manually or using tools web scraping, There's something for every profile and need!

1. Simple, manual methods

Simple, manual methods are ideal for beginners. They allow you to recover images quickly., without complex software. There are also simple solutions for developers!

Depending on your needs, you can choose between these two methods:

Method 1: Recording the web page

You can directly save the entire web page.

👉 With this method, your computer will create an .html file (the page itself), but also a folder containing all the elements of the page, including images.

Here's how to do it:

  • 1️⃣ Go to the webpage from which you want to extract the images.
  • 2️⃣ Then do the following Ctrl + S (for Windows) Where Cmd + S (for Mac).
  • 3️⃣ A window will open asking you to save the page.
  • 4️⃣ Ensure that the record type is «Complete Web Page».
  • 5️⃣ All you have to do is click on " To register » And that's it!
The webpage is saved on your computer + all its content
The web page is saved on your computer + all its content ©Alexia for Alucare.fr

✅ Advantages of this method: it is simple, but above all fast for occasional needs.

❌ Disadvantages: The folder contains many unnecessary files (style sheets, scripts, etc.) and there is no automatic sorting. Furthermore, this method does not always retrieve all images, especially those that are dynamically loaded by JavaScript scripts. This solution is not suitable for large quantities of files to be extracted.

Method 2: The code inspector (for developers)

If you know how to code, you can use this second method to retrieve all the images you are interested in with just one click! The code inspector allows you to’extract a specific image.

Here's how it works:

  • 1️⃣ Do Right-click on the image to extract.,
  • 2️⃣ Then click on "Inspect" at the very bottom.
Right-click on the image to find the code inspector.
Right-click on the image to find the code inspector ©Alexia for Alucare.fr
  • 3️⃣ A window opens with the page code.,
  • 4️⃣ Locate the line containing the beacon <img> with the src attributesuch as :

<img src="https://exemple.com/image.jpg" alt="description">

You will find the image code at the top.
You will find the image code at the top ©Alexia for Alucare.fr
  • 5️⃣ Right-click directly on this line of code. (the tag <img>) and select the option “Open in a new tab” or “Open in a new tab in the network.”.
  • 6️⃣ Once the image is displayed alone in the tab, Right-click on it, then select “Save image as...” to download it.

✅ Advantages of this method: precise and allows you to extract images loaded by JavaScript. 

❌ Disadvantages: this method is more technical and inconvenient for retrieving many images.

2. Image extraction tools and software

Want to easily extract multiple images at once? There are dedicated tools and software for this purpose. They enable’extract lots of’images from a web page, without complicating your life.

Browser extensions

Extensions are mini-programs to install directly on your web browser (Chrome, Firefox). Very easy to use, they are perfect for a occasional use.

Among the image extraction extensions The most common and practical ones include:

  • Image Downloader (Chrome)
  • Image Grabber (Firefox)

Regardless of the extension or browser, the instructions are generally the same:

  • 1️⃣ Install the extension via your web browser's store.
Click ADD TO GOOGLE CHROME to install the extension on your browser.
Click ADD TO GOOGLE CHROME to install the extension on your browser ©Alexia for Alucare.fr
  • 2️⃣ Then open the webpage where you want to extract the images.
  • 3️⃣ Click on the extension icon, and a small window will appear.
Click on the Image Downloader icon to launch the extension.
Click on the Image Downloader icon to launch the extension ©Alexia for Alucare.fr
  • 4️⃣ Select the images you want to download.
  • 5️⃣ Then click on the «Download» button.
Click on all the images you want to download, then click DOWNLOAD.
Click on all the images you want to download, then click DOWNLOAD ©Alexia for Alucare.fr

✅ Advantages of extensions: it is quick and visual, no need to code to control the spread.

❌ Disadvantages: Extensions are limited on web pages that use a lot of scripts and block downloads.

Dedicated web scraping software

Bright Data enables bulk image extraction
With platforms such as Bright Data, you can extract images in bulk ©Alexia for Alucare.fr

Need to extract a ton of images? You have the web scraping software !

Professional solutions such as Bright Data and Octoparse allow you to:

  • 👉 Extract all images from a page (or an entire website).
  • 👉 Filter by keyword or image size.
  • 👉 Retrieve associated metadata (title, alt, URL, etc.).

✅ Advantages of web scraping software: they are powerful solutions, automatable and highly flexible.

❌ Disadvantages: You often have to pay to use the most powerful tools.

Is it legal to extract images from a web page?

Technically, it is possible. But legally, it is not always allowed, because 👉 most images on the web are protected by copyright.

In addition, many sites prohibit scraping in their terms and conditions of use (TCU). So, always remember to check before extracting content!

Want to know more? We explain everything in our article on legality of web scraping.

Depending on your level and needs, there are several ways to’extract images from a web page.

Manual methods are sufficient for recovering one or two images with a single click. But for more complex needs, you have powerful tools like Bright Data At your disposal.

Which of the solutions proposed in this article do you plan to use to retrieve images from web pages? Feel free to share your feedback in the comments!

Found this helpful? Share it with a friend!

This content is originally in French (See the editor just below.). It has been translated and proofread in various languages using Deepl and/or the Google Translate API to offer help in as many countries as possible. This translation costs us several thousand euros a month. If it's not 100% perfect, please leave a comment for us to fix. If you're interested in proofreading and improving the quality of translated articles, don't hesitate to send us an e-mail via the contact form!
We appreciate your feedback to improve our content. If you would like to suggest improvements, please use our contact form or leave a comment below. Your feedback always help us to improve the quality of our website Alucare.fr


Alucare is an free independent media. Support us by adding us to your Google News favorites:

Post a comment on the discussion forum