Skip to main content

How to convert image URLs to actual images in Excel?

Author: Xiaoyang Last Modified: 2025-03-28
convert image URLs to actual images

In Excel, you may come across situations where you have a list of image URLs and want to display the actual images in the cells instead of just the links. This guide walks you through three methods to convert image URLs into actual images inside Excel.

Convert the image URLs to actual images in Excel


Convert the image URLs to actual images with VBA code

This method is perfect for users on older versions of Excel that don’t support the IMAGE function. VBA lets you automate the process of fetching and inserting images from URLs.

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

Sub URLPictureInsert()
Dim Pshp As Shape
Dim xRg As Range
Dim xCol As Long
On Error Resume Next
Application.ScreenUpdating = False
Set Rng = ActiveSheet.Range("A2:A5")
For Each cell In Rng
filenam = cell
ActiveSheet.Pictures.Insert(filenam).Select
Set Pshp = Selection.ShapeRange.Item(1)
If Pshp Is Nothing Then GoTo lab
xCol = cell.Column + 1
Set xRg = Cells(cell.Row, xCol)
With Pshp
.LockAspectRatio = msoFalse
If .Width > xRg.Width Then .Width = xRg.Width * 2 / 3
If .Height > xRg.Height Then .Height = xRg.Height * 2 / 3
.Top = xRg.Top + (xRg.Height - .Height) / 2
.Left = xRg.Left + (xRg.Width - .Width) / 2
End With
lab:
Set Pshp = Nothing
Range("A2").Select
Next
Application.ScreenUpdating = True
End Sub
Notes:
  1. In the above code, A2:A5 is the range of cells which contains the URL addresses you want to extract the images, you should change the cell references to your need.
  2. This code does not allow you to specify the size of the extracted images.
  3. The above code only can extract the actural images into the cells besides your URL column, you cannot specify the cell where the images should be output.
  4. You should have some basic knowledge of the code, if any character missed or incorrect, the code will not be executed successfully.
  5. Use sparingly on large data sets to avoid performance issues.

3. Then press F5 key to run this code, and all corresponding pictures have been extracted from the image URLs to the adjacent column at once, and the images will be placed at the center of your specific cells, see screenshot:

convert image URLs to actual images by vba code


Convert the image URLs to actual images with Kutools for Excel

If you're not comfortable working with VBA code or want a faster, more user-friendly solution, Kutools for Excel offers a powerful feature called "Insert Pictures from Path (URL)". This tool allows you to effortlessly insert images directly into your worksheet from online image URLs or local file paths—without writing a single line of code. It's ideal for users who need a quick, reliable way to batch import images and visually enhance their spreadsheets with just a few clicks.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Go to Kutools > Insert > Insert Pictures from Path (URL).

click Insert Pictures from Path (URL) feature of kutools

2. In the dialog box that appears, configure the following settings as shown in the screenshots:

configure the options in the dialog box

3. Click OK, and the pictures will be extracted from the URLs, see screenshot:

convert image URLs to actual images by kutools

Tip: If you check Add original image as comment option in the dialog box, Kutools will automatically insert the image as a cell comment as well, allowing you to preview the original image when hovering over the cell—without displaying it directly in the worksheet. This is especially useful for keeping your spreadsheet clean and lightweight while still retaining access to full-size images on demand.
insert image to comment as well

Convert the image URLs to actual images with IMAGE function (Excel 365)

If you’re using Excel 365 or Excel for the Web, you have access to the IMAGE() function—a simple and powerful way to display images directly from URLs in cells.

Syntax of the IMAGE function:

=IMAGE(source, [alt_text], [sizing], [height], [width])
  • source: URL of the image (must be HTTPS for security)
  • alt_text: Alternative text description
  • sizing: 0 to 3 for image fit options. 0 (fit cell), 1 (original size), 2 (custom size), 3 (maintain aspect ratio)
  • height, width: Only needed when sizing is set to 2

Enter the following formula into a blank cell where you want to display the image. Then, copy the formula down other cells. All images are extracted from the relative URLs. See screenshot:

=IMAGE(A2)

convert image URLs to actual images by image function

Limitations of this function::
  1. Only available in Excel 365 and Excel 2021
  2. Requires HTTPS URLs
  3. Limited image format support (JPEG, PNG, GIF, BMP)

All three methods can produce professional results when implemented properly. For modern Excel users, the IMAGE() function is the simplest and cleanest solution. If you're on older versions or need batch processing, VBA or Kutools are excellent alternatives. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials to help you master Excel.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!