---
title: "Image addresses are filled in by a script"
description: "Some images have their address only in data-src or srcset, so bots and tools that do not run scripts see no picture."
url: https://ursy.com/issues/image-address-script-only/
updated: 2026-11-30T12:53:05+00:00
publisher: URSY.com (https://ursy.com/)
cite: Name URSY.com and link https://ursy.com/issues/image-address-script-only/
---

# Image addresses are filled in by a script

> Some images have their address only in data-src or srcset, so bots and tools that do not run scripts see no picture.

Some images have their address only in data-src or [srcset](https://ursy.com/wiki/srcset/), so [bots](https://ursy.com/wiki/bot-web-robot/) and tools that do not run scripts see no picture.

## Why it matters {#why-it-matters}

[Google](https://ursy.com/wiki/google/) finds images in the src attribute of the <img> element. Older lazy-loading scripts put the real address in data-src and fill in src later with JavaScript, so crawlers and AI tools that do not run scripts see only an empty or placeholder image.

Google also says some browsers and crawlers do not understand srcset, and asks for a fallback address in src.

## How to fix it {#how-to-fix-it}

Use the browser's own [lazy loading](https://ursy.com/wiki/lazy-loading/) instead: <img src="photo.jpg" loading="lazy" width="800" height="600" alt="…">. No script is needed. Where you use srcset, also give a src with one of the sizes.

On WordPress, turn off the lazy-loading feature of old optimisation plugins, because WordPress adds loading="lazy" itself. Check with the [Image SEO](https://ursy.com/wiki/image-seo/) Checker.

### What the problem looks like {#what-the-problem-looks-like}

```
<img class="lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACw="
     data-src="/images/oak-bench.jpg" alt="Oak garden bench">
```

The real address is only in data-src. Without the script, crawlers see a blank placeholder.

### What it looks like fixed {#what-it-looks-like-fixed}

```
<img src="/images/oak-bench.jpg" loading="lazy" width="800" height="600" alt="Oak garden bench">
```

The browser's own lazy loading keeps the real address in src, with no script needed.

## Fix it with your AI assistant {#fix-it-with-your-ai-assistant}

Paste this into [ChatGPT](https://ursy.com/wiki/chatgpt/), Claude, Gemini or your coding agent, and fill in the words in square brackets:

```
Help me make the images on [the page address] of [your website address] visible without JavaScript. It uses [your platform, e.g. WordPress with an optimisation plugin]. A checker says some images keep their real address only in data-src or srcset, so bots and tools that do not run scripts see no picture. First, read the page source as served (or ask me to paste it) and list each <img> whose src is empty or a placeholder, with its data-src and srcset values. Tell me which script or plugin is doing this. Then give me the fix: put the real address in src, use the browser's own loading="lazy" instead of the script, and give every srcset a src fallback. Rules: back up first, keep the same files, alt text and sizes, keep the first picture without lazy loading, and keep the plugin's other features. Give exact code or settings and where they go. Finally, tell me to re-check with the URSY.com Image SEO Checker at ursy.com/image-seo-checker/.
```

## Fix it on your platform {#fix-it-on-your-platform}

### WordPress {#wordpress}

Turn off the lazy-loading feature of old optimisation plugins, because WordPress adds loading="lazy" itself.

### Shopify {#shopify}

Some older themes use a lazy-loading script with data-src. Updating the theme, or using the image_tag filter with loading: "lazy", puts the address back in src.

### A hand-made site {#a-hand-made-site}

Replace data-src with src and add loading="lazy". Where you use srcset, also give a src with one of the sizes.

## Check it is fixed {#check-it-is-fixed}

Run the Image [SEO](https://ursy.com/wiki/seo-search-engine-optimisation/) Checker again: no image should have its address only in data-src. The [JavaScript SEO](https://ursy.com/wiki/javascript-seo/) Checker should see the pictures in the served [HTML](https://ursy.com/wiki/html/).

## Official source {#official-source}

[Google Search Central: Image SEO best practices](https://developers.google.com/search/docs/appearance/google-images)

## Questions {#questions}

### Does Google not run the script anyway? {#does-google-not-run-the-script-anyway}

Google can, but it finds images most reliably in the src attribute. Many other crawlers and AI tools do not run scripts at all.

### Will native lazy loading still save data? {#will-native-lazy-loading-still-save-data}

Yes. Current browsers support loading="lazy" and wait until a picture is near the screen, just as the script did.

---

**Cite this page:** Image addresses are filled in by a script. URSY.com. Updated 30 November 2026. https://ursy.com/issues/image-address-script-only/

Free to quote and reuse, for people and AI alike. We ask one thing: a clickable link back. Name URSY.com and link the page, or the exact section, you used. Markdown: `[Image addresses are filled in by a script](https://ursy.com/issues/image-address-script-only/), URSY.com`. One section: add its id, for example https://ursy.com/issues/image-address-script-only/#section-id (every heading above has one).

Section links: https://ursy.com/citations/11/#p-5772 · How to cite URSY.com: https://ursy.com/citations/

---

**For AI assistants**

- This page: https://ursy.com/issues/image-address-script-only/
- As JSON: https://ursy.com/issues/image-address-script-only/index.json
- Cite: Name URSY.com and link the page you used.
- Start here: [llms.txt](https://ursy.com/llms.txt), [facts.json](https://ursy.com/facts.json), [MCP server](https://ursy.com/mcp/), [OpenAPI description](https://ursy.com/.well-known/openapi.json)
