This VBA script uses column A as filename, B as image url and adds a ".jpg" as extension.
Problem is that many files are not in jpg format, so it's best to consider them having an unknown extension.
Is it possible to tweak the script so that it gets the real file extension before saving the image and add it to filename instead of the user defined ".jpg" ?
The Script
Option Explicit
'~~> This macro downloads images from urls. Column A=image title, Column B=image URL.
Private Declare Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Dim Ret As Long
'~~> This is where the images will be saved. Change as applicable
Const FolderName As String = "C:\Users\plus\Desktop\INPUT\"
Sub DOWNLOAD_image_XLS()
'~~> This is where text is divided into 2 columns right down the "|" delimiter
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1") _
, DataType:=xlDelimited _
, Other:=True _
, OtherChar:="|"
Dim ws As Worksheet
Dim LastRow As Long, i As Long
Dim strPath As String
Set ws = ActiveSheet
LastRow = ws.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow '<~~ 2 because row 1 has headers
strPath = FolderName & ws.Range("A" & i).Value & ".jpg"
Ret = URLDownloadToFile(0, ws.Range("B" & i).Value, strPath, 0, 0)
If Ret = 0 Then
ws.Range("C" & i).Value = "OK"
Else
ws.Range("C" & i).Value = "Failed!"
End If
Next i
End Sub