惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
AI
AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
H
Help Net Security
Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
L
LINUX DO - 最新话题
A
Arctic Wolf
博客园_首页
S
Securelist
S
Secure Thoughts
Google DeepMind News
Google DeepMind News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Cyberwarzone
Cyberwarzone
小众软件
小众软件
T
Threatpost
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Blog — PlanetScale
Blog — PlanetScale
N
News and Events Feed by Topic
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
博客园 - 聂微东
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
H
Heimdal Security Blog
罗磊的独立博客
S
Security @ Cisco Blogs
B
Blog
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
Hacker News - Newest:
Hacker News - Newest: "LLM"
I
Intezer
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
The Cloudflare Blog
S
Schneier on Security
月光博客
月光博客
L
LINUX DO - 热门话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

Learn Command Line Interface (CLI) Development with Dart: From Zero to a Fully Published Developer Tool How to Build a Live Options Database in Python – A Complete Guide How to Migrate to S3 Native State Locking in Terraform How to Use SCons to Build Software Projects [Full Handbook] How to Run Open Source LLMs Locally and in the Cloud QuRT: The Real-Time OS Inside Your Phone's Processor [Full Handbook] The Real Infrastructure Behind Remote Work (It’s Not Just Wi-Fi) The Lithography Handbook: Machines, Markets, and the Next Wave of Semiconductor Startups ITCM vs DTCM vs DDR: Embedded Memory Types Explained [Full Handbook] AI Paper Review: Improving Language Understanding by Generative Pre-Training (GPT-1) How to Build a Market Research Copilot with MCP and Python [Full Handbook] How to Build a Scoped Note-Taking API with Django Rest Framework and SimpleJWT The Complete SOC 2 Type II Implementation Handbook for Engineers: A Month-by-Month Roadmap with Real Commands Mastering the JavaScript Event Loop Data Science Insights: Why the Mean Lies When Handling Messy Retail Data How to Build High-Ranking SEO Landing Page How to Query Data in DynamoDB Using .Net How to Unblock Your AI PR Review Bottleneck: A Tech Lead’s Guide to Building a Codebase-Aware Reviewer How to Navigate Microservices as a Frontend Engineer How to Compress PDF Files in the Browser Using JavaScript (Step-by-Step) Stanford's youngest instructor talks InfoSec, AI, and catching cheaters - Rachel Fernandez interview [Podcast #217] Product Experimentation with Propensity Scores: Causal Inference for LLM-Based Features in Python How to Build a Multi-Agent AI System with LangGraph, MCP, and A2A [Full Book] How to Land Your First Cloud or DevOps Role: What Hiring Managers Actually Look For How to Deploy a Serverless Spam Classifier Using Scikit-Learn, AWS Lambda, & API Gateway How to Dockerize a Go Application – Full Step-by-Step Walkthrough Learn Hardware, Cloud, DevOps, Networking, Security, Databases, DNS, Git, and Linux Inside TreeHacks 2026, Stanford’s Elite Student Hakc Inside Stanford’s Elite Student Hackathon [Full Documentary] How to Measure Your AI Citation Rate Across ChatGPT, Perplexity, and Claude How to Deploy a Full-Stack Next.js App on Cloudflare Workers with GitHub Actions CI/CD How to Build a Multi-Tenant SaaS Platform with Next.js, Express, and Prisma How I Completed 15 freeCodeCamp Certifications in 4 Months: A Structured Learning Journey How to Build an Agentic Terminal Workflow with GitHub Copilot CLI and MCP Servers How AI Changed the Economics of Writing Clean Code How to Apply STRIDE Threat Modeling and SonarQube Analysis for Secure Software Development How to Set Up OpenID Connect (OIDC) in GitHub Actions for AWS How to Split PDF Files in the Browser Using JavaScript (Step-by-Step) How to Build Your Own Language-Specific LLM [Full Handbook] How to Build a Self-Learning RAG System with Knowledge Reflection How to Trace Multi-Agent AI Swarms with Jaeger v2 How I Tested Malaysia's Open Data Portals with Plain English How I Built a Production-Ready CI/CD Pipeline for a Monorepo-Based Microservices System with Jenkins, Docker Compose, and Traefik The Hidden Tax of Infrastructure: Why Your Team Shouldn’t Be Running It Anymore From Metrics to Meaning: How PaaS Helps Developers Understand Production From Symptoms to Root Cause: How to Use the 5 Whys Technique Product Experimentation for AI Rollouts: Why A/B Testing Breaks and How Difference-in-Differences in Python Fixes It How to Create a GPU-Optimized Machine Image with HashiCorp Packer on GCP 3D Web Development with Blender and Three.js How to Fix a Failing GitHub PR: Debugging CI, Lint Errors, and Build Errors Step by Step How to Merge PDF Files in the Browser Using JavaScript (Step-by-Step) How to Handle Stripe Webhooks Reliably with Background Jobs How to Build an Automatic Knowledge Graph for Your Blog with PHP and JSON-LD Understanding Proxies and Reverse Proxies: Your Gateway to Secure Networking The Evolution of Nvidia Blackwell GPU Memory Architecture How to Use PostgreSQL as a Cache, Queue, and Search Engine The New Definition of Software Engineering in the Age of AI Reclaim Your Time – Master Automation with Zapier How to Create Dynamic Emails in Go with React Email Why Many Beginner Self-Taught Developers Struggle (And What to Do About It) How to Build a Headless WordPress Frontend with Astro SSR on Cloudflare Pages How to Make Your GitHub Profile Stand Out How to Use Context Hub (chub) to Build a Companion Relevance Engine Why Chrome OS Is the Operating System the AI Era Was Built For How to Build Microservices-Based REST APIs for Healthcare Portals How to friction-max your learning with software engineer Jessica Rose [Podcast #216] Shadow AI Explained: Why Employees Are Using AI Behind Your Back Traditional Scraping vs AI Scraping: A Practical Guide for Developers and Data Teams How Database Indexes Work – A Practical Guide with PostgreSQL Examples How to Streamline Search in Web Applications with Elasticsearch How to Build an Open Source Data Lake for Batch Ingestion OpenAI Codex Essentials – AI Assisted Agentic Development Course Learn Software System Design How to Generate PDF Files in the Browser Using JavaScript (With a Real Invoice Example) How to Get Started with Terraform Service-to-Service Communication: When to Use REST, gRPC, and Event-Driven Messaging A Developer’s Guide to Lazy Loading in React and Next.js The Data Quality Handbook: Data Errors, the Developer's Role, and Validation Layers Explained. United States Residential Proxy: Why Local IP Accuracy Matters for SERP, Ads, and Pricing How to Build a Fashion App That Helps You Organize Your Wardrobe How to Build an Admin Dashboard Sidebar with shadcn/ui and Base UI The AI Governance Handbook: How to Build Responsible AI Systems That Actually Ship How to Build a Local DevOps HomeLab with Docker, Kubernetes, and Ansible How to Use Mixins in Flutter [Full Handbook] How to Prep for Technical Interviews – A Guide for Web Developers GPT-5.4 vs GLM-5: Is Open Source Finally Matching Proprietary AI? Data Visualization Tools for Svelte Developers How to Keep Human Experts Visible in Your AI-Assisted Codebase Efficient Data Processing in Python: Batch vs Streaming Pipelines Explained How to Build and Deploy Multi-Architecture Docker Apps on Google Cloud Using ARM Nodes (Without QEMU) How to Build a Secure AI PR Reviewer with Claude, GitHub Actions, and JavaScript How to Build a Positioning-Based Crude Oil Strategy in Python [Full Handbook] How to learn programming and CS in the AI hype era – interview with dev and prof Mark Mahoney [Podcast #215] CUDA Programming for NVIDIA H100s How to Build Reliable AI Systems. How to Build an Online Marketplace with Next.js, Express, and Stripe Connect How to Build a Cost-Efficient AI Agent with Tiered Model Routing The WebCodecs Handbook: Native Video Processing in the Browser The Bluetooth LE Audio Handbook: From "Why Does My Call Sound Like a Tin Can?" to AOSP Implementation How to Set Up OpenClaw and Design an A2A Plugin Bridge
How to Insert Images in Google Sheets
Vikram Aruchamy · 2026-06-25 · via freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
How to Insert Images in Google Sheets

Google Sheets is widely used for tracking data, managing inventories, building product catalogs, and creating dashboards. In many of these use cases, adding images directly into a spreadsheet makes the data easier to understand and work with.

Whether you're displaying product photos, marketing assets, or property listings, Google Sheets provides several ways to insert and display images.

In this tutorial, you'll learn how to:

  • Insert images using the Insert menu in Google Sheets

  • Display images from a URL using the IMAGE() function

  • Work with multiple images stored in Google Drive

Table of Contents

  • Understanding How Images Work in Google Sheets

  • Inserting Images Using the Insert Menu in Google Sheets

  • Inserting Images in Google Sheets Using the IMAGE Function

  • Inserting Multiple Images from URLs

  • Best Practices

  • Working with Multiple Images Stored in Google Drive

  • Which Method Should You Choose?

  • Conclusion

Understanding How Images Work in Google Sheets

The way an image is inserted in Google Sheets determines how it behaves when you sort data, resize rows, or build automated workflows.

This becomes particularly important when working with product catalogs, asset trackers, or spreadsheets that are connected to Google Drive workflows, such as listing files from Drive into Google Sheets or uploading files from Google Sheets into Google Drive.

Before inserting images, it's important to understand the two image placement options available in Google Sheets:

Images Inside Cells:

Images become part of the cell itself and behave like spreadsheet data when rows and columns are moved, resized, filtered, or sorted.

The following image shows how the image inserted inside Google Sheets cell looks like:

Image inside a cell in Google Sheets

Benefits of inserting an image inside a cell include:

  • Moves with rows and columns

  • Resizes when cells are resized

  • Sorts correctly with spreadsheet data

  • Ideal for inventories and catalogs

Images Over Cells:

Images remain independent of the underlying cells and float above the spreadsheet, allowing them to be freely positioned and resized without affecting spreadsheet data.

The following image shows how the image inserted over the Google Sheets cell looks:

Image over the cell in Google Sheets

Benefits include:

  • Freely position images anywhere on the sheet

  • Useful for logos and visual elements

  • Better suited for dashboards and reports

For most spreadsheet-based workflows, Images inside Cells is usually the preferred option.

If you're working with a large number of images stored in Google Drive, manually collecting image URLs can quickly become time-consuming.

Tools such as Drive Explorer Pro can help automate this process by listing files and generating image URLs directly in Google Sheets. It can also include additional file metadata such as image previews, file names, download URLs, sharing permissions, and other file details, making it easier to organize, manage files at scale as shown in the following image:

Listing google drive file in Google Sheets

Next, you'll see how to insert images inside cell or over a cell.

The Insert menu is the simplest way to add a small number of images to Google Sheets. Using this method, you can insert images either inside cells, where they behave like spreadsheet data, or over cells, where they float above the worksheet.

Image in Cell

  1. Select the destination cell.

  2. Click Insert → Image → Insert an image in the cell.

  3. Choose an image source:

    • Upload from computer

    • Google Drive

    • Google Photos

    • Camera

    • URL

  4. Select the image and click Insert.

Google Sheets places the image inside the selected cell, allowing it to move, resize, and sort with your spreadsheet data.

Tip: Resize rows and columns before inserting images. Large image files can increase spreadsheet size even when displayed in small cells.

Best for:

  • Product catalogs

  • Inventory tracking

  • Asset management

  • Small datasets with manual image entry

Limitation: Each image must be inserted individually, making this approach difficult to maintain for larger datasets.

Image Over Cells

  1. Click Insert → Image → Insert an image over the cells.

  2. Select and upload an image.

  3. Resize and position it as needed.

Unlike images in cells, these images float above the spreadsheet and aren't tied to specific rows or columns.

Best for:

  • Company logos

  • Dashboard graphics

  • Visual annotations

  • Presentation-style spreadsheets

For inventories and product databases, Image in Cell is usually the better choice.

If you need larger image previews, see how to create an image lightbox in Google Sheets using XLOOKUP or Apps Script.

Inserting Images in Google Sheets Using the IMAGE Function

If your images are already available online, the IMAGE function can display them directly inside spreadsheet cells using a URL.

TheIMAGE() function doesn't store images inside the spreadsheet. It simply displays images from external URLs. If the source image is deleted, moved, or becomes inaccessible, the image will disappear from the sheet.

IMAGE Function Syntax

=IMAGE(url,[mode],[height],[width])

The optional mode parameter controls how the image is displayed inside the cell.

Google Sheets supports four display modes:

Mode Formula Behavior
1 (Default) =IMAGE(A2,1) Fits the image inside the cell while preserving its aspect ratio
2 =IMAGE(A2,2) Stretches the image to fill the entire cell
3 =IMAGE(A2,3) Displays the image at its original dimensions
4 =IMAGE(A2,4,200,200) Displays the image using custom width and height values

For most spreadsheets, Mode 1 is the best choice because it maintains image proportions while fitting neatly within the cell. Use Mode 4 only when you need fixed image dimensions, as custom-sized images can become more difficult to maintain in large spreadsheets.

Basic Example

=IMAGE("https://example.com/product-image.jpg")

Google Sheets retrieves the image from the URL and displays it inside the cell using Mode 1 by default.

Displaying Images from a Column of URLs

If column B contains image URLs, use:

=IMAGE(B2)

Then copy the formula down to generate image previews for every row.

Best for:

  • Product catalogs

  • eCommerce inventory sheets

  • Asset tracking systems

  • Marketing content databases

Common Issues

Most IMAGE function problems are caused by one of three issues:

Permissions: Google Drive images must be shared as Anyone with the link can view.

Direct URLs: Standard Google Drive sharing links won't work. Convert them to:

https://drive.google.com/uc?id=FILE_ID

Performance: Because the IMAGE function loads images from external URLs whenever the spreadsheet recalculates, large image files or hundreds of image formulas can impact spreadsheet performance. For best results, use optimized image sizes rather than full-resolution photos.

Inserting Multiple Images from URLs

When image URLs are already stored in a spreadsheet, the IMAGE function can generate image previews automatically for every row using the ARRAYFORMULA() function.

For example, if image URLs are stored in column A:

=ARRAYFORMULA(IF(A2:A="","",IMAGE(A2:A)))

This formula applies the IMAGE function to every populated row, eliminating the need to insert images individually.

Benefits:

  • No manual image insertion

  • Automatically updates when image URLs change

  • Easy to maintain as data grows

  • Works well with imported or generated datasets

  • Can be combined with automated workflows

This approach is commonly used for:

  • Product catalogs

  • Inventory management

  • Asset tracking systems

  • Marketing content databases

For most spreadsheet-based image workflows, this is the simplest and most scalable way to display multiple images in Google Sheets.

Performance Considerations:

Displaying a large number of images can impact spreadsheet responsiveness because each image must be retrieved and rendered from its source URL.

To maintain performance:

  • Use optimized image sizes instead of full-resolution photos

  • Avoid displaying thousands of images on a single sheet

  • Apply filters when working with large datasets

  • Split large image catalogs across multiple sheets when necessary

Troubleshooting:

Problem Likely Cause Fix
Broken image or empty cell Source not public Set Drive file to Anyone with the link, then test URL in an incognito window
Formula runs but no image Unsupported format IMAGE supports PNG, JPEG, and GIF only
Works in browser, not in sheet Viewer page URL, not direct link Use uc?id=FILE_ID or lh3.googleusercontent.com/d/FILE_ID
Image never loads Password-protected or login-required site Move image to a publicly accessible host
Sheet loads slowly Large source files Resize to ~200×200 px before linking

Best Practices

  • Optimize before linking: Resize images to thumbnail dimensions (~200×200 px) instead of linking 5 MB originals.

  • Use predictable URL patterns: If images follow a folder structure, generate URLs with CONCATENATE rather than maintaining a static URL per row: =IMAGE("https://cdn.example.com/products/" & A2 & ".jpg")

  • Don't expose sensitive files: Making a Drive file public just to display it in a sheet can expose it to anyone who sees the URL. For private images, use the Insert menu or a tool that respects Drive permissions.

Working with Multiple Images Stored in Google Drive

When images are stored in Google Drive, displaying them with the IMAGE function requires an image URL for each file. While this is manageable for a few images, manually collecting URLs can quickly become time-consuming when working with larger image libraries.

A common workflow is to first list files from Google Drive into Google Sheets, then use the resulting file links or image URLs to generate image previews with the IMAGE function.

This approach works particularly well for:

  • Product catalogs

  • Inventory tracking

  • Marketing asset libraries

  • Team directories

For a small number of files, you can paste Google Drive sharing links into a spreadsheet and convert them into image previews using a formula:

=IMAGE("https://drive.google.com/uc?export=view&id=" & REGEXEXTRACT(A2,"/d/([^/]+)"))

Each file must be shared as Anyone with the link can view for the image to display correctly.

Working with Large Image Libraries:

When managing hundreds or thousands of images, manually collecting and converting Drive links becomes difficult to maintain.

In these situations, it's often more efficient to first list files from Google Drive into Google Sheets and then generate image previews automatically.

Video Tutorial: How to Insert Image Inside a Cell in Google Sheets

Which Method Should You Choose?

Use Case Recommended Method
Insert a few images manually Insert Menu
Add logos and graphics Image Over Cells
Display images from URLs IMAGE Function
Product catalogs IMAGE Function
Inventory management IMAGE Function
Large Google Drive image libraries Drive Explorer Pro + IMAGE Function

Conclusion

While inserting a few images into Google Sheets is straightforward, managing images at scale requires a different approach. Understanding the difference between manually inserted images, URL-based images, and Google Drive workflows allows you to build spreadsheets that remain efficient as your data grows.

By using the right image workflow from the start, you can create catalogs, inventories, and reporting systems that are easier to update, automate, and maintain over time.



Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started