MEDIA-JOOMLAIMAGE-001

images/lms/hero.jpg (raw path)

Media field #joomlaImage:// paths

Joomla 4 media fields store #joomlaImage://local-0/images/foo.jpg?width=… not a plain path. Echoing the raw value breaks <img>.

images/lms/hero.jpg (raw path)HTMLHelper::cleanImageURL() / MediaHelper::getCleanMediaFieldValue()

Dies at Joomla 3 → 4J3: Works nativelyJ4: Changed behaviourJ6: Changed behaviourBC plugin: not applicablePatch possible — review itJoomla API

Symptoms people search

broken images after Joomla 4 · joomlaImage in src · media field

Replace this code

Swap images/lms/hero.jpg (raw path) for HTMLHelper::cleanImageURL() / MediaHelper::getCleanMediaFieldValue().

Joomla 3

Remove or stop calling this

echo '<img src="' . $this->item->image . '">';

Joomla 4 / 6

Use this instead

$img = HTMLHelper::cleanImageURL($this->item->image);
echo '<img src="' . htmlspecialchars($img->url) . '">';

How to fix it

  1. 1Run cleanImageURL before output.
  2. 2Or MediaHelper::getCleanMediaFieldValue().

Also known as

#joomlaImage · cleanImageURL · media field

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.