Bulk Download Images from URLs – Convert & Rename

Batch downloading images, and renaming them, isn’t something you’ll use often, but when you do, doing it in bulk can really save you quite a bit of time.

Why would you want to do it?

Well, plenty of reasons. From migrating images, wanting to bulk optimise their file names, or downloading imagery from brands for products you sell.

Using the attached Excel file, you can insert all the new image names, along with their current source URLs, and the macro will download all the images, give them the new names, and also save them as .jpg files no matter their source extension.

How to batch download & rename images with Excel

The following is the process on how to download images from url in excel and rename them;

1. Download and open the Excel image URL downloader

2. Click on Developer > Macros and then hit edit on the selected one in the file

 

3. Edit the folder path that is highlighted, with it needing to point to a folder that currently exists. This is where the newly renamed images will be downloaded too. If you point it to a folder that doesn’t exist, it won’t visually create the folder. However, if you create the folder after the fact, all the files will be there. So, yeah.

 

4. Insert all the new image names in, ensuring the new name includes dashes, and doesn’t include a file extension

 

5. Click on ‘macros’ and then click run on the selected macro

 

You’ll now get ‘File Downloaded Successfully’ on all the files that have downloaded from the websites okay.

 

You’ll see an error if it doesn’t work, with most errors I have seen attributed to being blocked by the source you’re scraping. Depending on the use, you can ask for your IP to be unlocked, but sometimes it’s just quicker to throw on a VPN.

Another issue I have seen is that if you include an extension in the name, you will end up with double image extensions like .jpg .jpg. You can modify the script by dropping the .jpg extension that’s included if you really want, but it’s just easier to exclude the extension names.

Download the Excel Image Downloader
  You will receive a download link via email. We hate spam and never share your details.

Successful bulk image download from URL & Rename

This URL image downloader should have now successfully downloaded and renamed all the images you will need, extremely fast.

About The Author

9 thoughts on “Bulk Download Images from URLs – Convert & Rename”

  1. HI,
    It would be such a great help. I tried running the macro but it says
    Compile Error:
    The code in this project must be updated for use on 64 bit systems. Please review and update declare statements and then mark them with the ptrsafe attribute.

  2. This still works thank you very much!

    If anybody gets the Compile Error saying it must be updated for 64 bit… the fix is to add in text “PtrSafe” in to the macro.

    So this line at the top…

    Private Declare Function URLDownloadToFile Lib “urlmon” _

    Change to (to include “PtrSafe”)…

    Private Declare PtrSafe Function URLDownloadToFile Lib “urlmon” _

  3. Hi – I love the macro and greatly appreciate the work but I’ve been having a minor issue. When I change the string to match the folder destination it doesn’t download to that destination. Instead the images download to the local ‘Pictures’ folder with the folder destination’s name at the front of the string from the ‘Name’ column.
    E.g
    Const FolderName As String = “C:\Users\Example PC\Pictures\Image-Tests”

    Result:
    Image-TestsName.jpg

    I might be missing something obvious but any help would be greatly appreciated.

      1. You both need to ensure there is a trailing slash on the folder path. If you re-download, or just open the original, you’ll see it as;

        Const FolderName As String = “C:\Users\sam\Desktop\Image Downloader\folder-that-must-exist\”

        Just add the trailing slash and you should be good to go.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top