Joomla Images Broken After Migration

Joomla Images Broken After Migration hero

Written by

in

Joomla images break after a migration when article HTML or the #__content images JSON still points at the old domain, the images/ or media/ folder never arrived, or a CDN still serves the previous host. That is a stored-URL problem. It is not the same as images failing to load because of file permissions, hotlink protection, or a missing rewrite for static files.

When we move a Joomla 4, 5, or 6 site, the database often lands first. The new site renders. Every intro image, full-article image, and TinyMCE <img> still names the old URL. Browsers request a host that no longer has those files.

Old host still in content versus new host with the images folder copied

The files can sit on the new server and still fail if HTML and JSON keep the old absolute URL.

What you will learn

  • How this differs from generic images not loading
  • Where Joomla stores image paths: HTML, images JSON, modules
  • Why a copied database without images/ looks half migrated
  • How CDN and $live_site keep the old host alive
  • How to find and rewrite those URLs
  • What to verify before you call the move done

Why migration breaks images (and permissions do not)

A permissions or hotlink failure usually hits every image, including template CSS backgrounds. The Network tab shows 403 or 404 on paths that already use the new domain.

A migration URL failure is picky:

Symptom Typical cause after a move
Template logo works, article photos do not Absolute URLs inside article HTML or images JSON
Intro image missing, inline body images work #__content.images still has the old host; introtext was relative
Everything 404s on /images/... on the new host images/ or media/ was not in the file copy
Some images load from a third hostname CDN plugin or HTML still pointing at the old CDN zone
Only one category or language is broken That content was saved with absolute URLs; the rest was relative

Official copy process: Copying a Joomla website. Directory moves: Moving the site among directories/sub-directories. Article fields: Articles: Edit.

If you also changed the folder (/joomla/ to document root), relative paths that included the old subdirectory break even without a domain change.

Five checks after a Joomla move: folder, HTML, images JSON, CDN, live_site

Run these five before you rewrite. Skip a layer and you fix HTML while JSON still points at the old host.

Step 1: Prove it is a stored URL, not a generic load failure

Open one broken article on the new site. Copy the image address from the missing picture.

  1. If the host is the old domain, you have absolute URLs in content. Continue this article.
  2. If the host is the new domain and the path 404s, the file was not copied. Go to Step 4.
  3. If the host is a CDN hostname, go to Step 5.
  4. If the address is the new domain, the file exists, and you still see a broken icon, that is cache, an override, or permissions. Do not mass-replace URLs.

Check a template image (a Cassiopeia logo or a CSS background). If those work and only article media fails, you are in stored-URL territory.

Step 2: Hunt absolute URLs in article HTML

Joomla articles store body copy in introtext and fulltext. TinyMCE, when it is not set to relative URLs, writes the full host:

https://old.example.com/images/headers/hero.jpg

On Joomla 4, 5, and 6 open System → Plugins → Editors – TinyMCE. Confirm new edits will not bake an absolute host again. That setting does not rewrite old articles. It only protects the next save.

Administrator search is not enough. Search the database on #__content.introtext and #__content.fulltext for the old hostname, leftover http:// after an HTTPS cutover, and the old subdirectory.

Also search:

  • Custom HTML modules (mod_custom in #__modules)
  • Banner records if you use com_banners
  • Template style parameters (logo path)
  • Custom fields of type media or editor

Step 3: Read the #__content images JSON

This is the part most HTML search-and-replace jobs miss.

Each article has an images column. It is JSON, not HTML. Intro Image and Full Article Image on the Images tab write here:

JSON key What it is
image_intro Intro and blog image path
image_fulltext Full-article image path
image_intro_alt / image_fulltext_alt Alt text. Keep these.
image_intro_caption / image_fulltext_caption Captions

A broken value is an absolute URL to the old host. A healthy value is a relative path such as images/banners/map.jpg. Relative paths survive a domain change if the files were copied.

There is a sibling urls JSON for the three article link fields. Those can also hold the old host.

Do not run a careless SQL replace that breaks JSON escaping. Export a sample row, confirm the shape, then either open the article and re-select the image in Media, or replace only the old host and validate the JSON.

Step 4: Confirm the media folders actually copied

A database-only restore is the classic "site looks fine, every photo is broken" move.

Path Why it matters
images/ Default Media Manager tree (banners, headers, user folders)
media/ Core and extension assets. Some extensions store uploads here
Extension folders Example: leftover media/k2/ if a K2 move is unfinished

If images/ is empty or missing, no URL rewrite will help. Copy the folder from the old host or from a backup that actually included files. Then fix URLs.

If you migrated off K2, intro images may still point at media/k2/. Finish the content move and page 301s with Migrate K2 to Joomla articles.

Step 5: CDN, $live_site, and protocol leftovers

CDN. If a performance plugin rewrote <img src> to https://cdn.old-domain.com/..., the HTML on the new site still calls that hostname. Point the CDN at the new origin, or rewrite those URLs back to local /images/ until the new zone is ready.

$live_site in configuration.php. On Joomla 4, 5, and 6 this is usually an empty string. A leftover https://old.example.com (or a subdirectory) from an older install can prefix generated URLs. Set it to '' unless you have a documented reason not to.

http vs https, www vs bare. Absolute URLs that still say http://www.old... fail after you force HTTPS on the new host. Treat protocol and host as one replacement job. Once the certificate works, System → Global Configuration → Server → Force HTTPS can be Entire Site. Help screen: Global Configuration.

Step 6: Rewrite, then verify in the browser

  1. Copy images/ and any extension media. Confirm a known file opens as https://new.example.com/images/....
  2. Stop new absolute URLs in TinyMCE.
  3. Replace the old host in HTML fields (introtext, fulltext, custom modules).
  4. Fix images JSON, and urls if needed.
  5. Clear Joomla cache (System → Maintenance → Clear Cache) and any CDN cache.
  6. View-source a blog layout and a single-article layout. Intro images only appear on the layout that uses them.

Spot-check ten articles, not one. Older content often has a second pattern.

If old page URLs are indexed, use the Joomla 301 redirects checklist. Image files on a dead host cannot be 301'd from the new site.

Need the move done on a live client site? Joomla support and maintenance.

Key takeaways

  1. Broken images after a move are usually stored absolute URLs or a missing images/ folder, not a generic media permission bug.
  2. Article body HTML and #__content.images JSON are two stores. Fix both.
  3. Custom HTML modules and CDN-rewritten src values are a third store.
  4. Keep TinyMCE on relative URLs so the next save does not re-bake the old host.
  5. $live_site should be empty on a normal Joomla 4, 5, or 6 site.

Related Joomla troubleshooting

Frequently asked questions

Why did only some Joomla images break after migration?

Those articles (or modules) were saved with absolute URLs. Content that already used relative images/... paths still works if the folder was copied.

I copied the database. Why are images still broken?

The database stores paths, not files. If images/ and media/ were not in the file copy, every path 404s on the new host.

Where is the intro image stored if it is not in the article body?

In the images JSON column on #__content, from the article Images tab (image_intro and image_fulltext). Replacing HTML will not touch it.

Can a CDN break images after I change domain?

Yes. HTML may still call the old CDN hostname. Update the CDN origin or rewrite those src values to the new site.

Is this the same as Joomla images not loading?

No. "Not loading" is often permissions, an ad blocker, or a 403 on the current host. After migration, start with old-domain URLs, missing folders, JSON, and CDN.