Upgraded kirby, images won't load

,

I recently upgraded a Kirby v2 site I’d built in 2014 to the latest version of the software (v5+).

Everything is working fine except certain images won’t load in the browser. They are images in the blog/journal entries, so dynamically called.

In each blog entry, I can see the images with the alt text, but the actual images aren’t there:

I am also having issues displaying images that come from fonts. The image appears but only the alt tag contents.

Screenshot 2025-09-30 at 17-54-43 Geof Harries Race report Belgian Waffle Ride Canada (BC)

I’ve checked permissions and the related images have the correct permissions. I have no plugins nor a media folder. The cache is empty. Pages with static images load.

The blog images are in the same folder as the entry.txt and I use this simple bit of code to display the text/images in the blog entry template:

<?php echo $page->text()->kirbytext() ?>

Any idea on what I could change to resolve this issue?

Thanks

Geof

Kirby creates job files for all media files uploaded to the content folder in the /media folder. This folder serves as a cache. So whenever the url of a media file is called, a copy of the file or a version of the file (in case of thumbs) is created in the media folder.

Kirby needs permissions to create folders and files inside those folders. So the first step would be to check file/folder ownership and permissions.

Hi,

I checked that folder and within /media the other pages (sections) in the site get their folders created automatically when I visit them but the /journal part of the website does not.

Could that be the reason why the journal entry images aren’t loading?

I also reviewed other folder level permissions and they appear to be exactly the same as I had them on the previous version of the website. This includes the individual images that aren’t showing up.

I noticed that on my entries in the old version of the website, the URL for the image is very different than in this new version of Kirby.

This is the old entry URL pattern which successfully loads the image:

https://domain/media/pages/journal/entry-title/4a98f6fab0-1758721722/image.jpg

That looked related to the Media folder so I deleted the /media folder to try and start over again.

It was then I observed that if I go to any section or page that is not part of the section causing issues (/journal) the media folder gets re-created automatically and so do the pages I visit.

But when I go to entries for /journal that folder does not get re-created at all.

Are the images on the different types of pages referenced in the same way? I take it that in your journal entries you use the image kirbytag? Is that the same on the pages where images work?

Are you using the UUID feature?

Images are referenced in different ways.

On the static pages that are loading images successfully I use this code:

<img src="<?= $file->url() ?>" alt="">

Whereas in the journal entries where the images are not loading, it’s all included in the single kirbytext reference. I don’t look for the images on their own, just in this one tag for all content:

<?php echo $page->text()->kirbytext() ?>

I am not using the UUID feature.

So it would seem to me that the issue is with the /media folder and specifically that the journal entries don’t get generated there as new folders.

I’ve tried deleting the previous /media folder and starting fresh. Kirby then re-creates the /media folder and the static content pages get their sub-folders re-created on the fly, but never the folders for /journal.

What I wanted to see is an example how they appear in your content text files, assumingly as an image kirbytag. Could you please post an example?

As a live example, this is a journal entry on my old/current website that is running on Kirby v2.

Here’s the same journal entry but on a copy of the website running v5. You can see the images don’t load and only the ALT tag content shows up.

The entry.txt file for that same entry just references the images inline like this:

<figure><img src="bike-commuting-climate-change-punk-rock/activists.jpg" alt="Environmental activists" /></figure>

This is how that folder and entry is structured:

Well, I see here that the image tag has no proper URL. But I ask my question again, please show me the source text that references the image in your content txt file (entry.txt). An image kirbytag ((image: table.jpg) is by default converted to an image url

<figure><img alt="A very clean white room with a small table and a chair in front of it. It's very minimalistic." src="http://my.domain/media/pages/about/a810438f62-1759223286/table.jpg"></figure>

Not that the url is required for the copy process to work.

Hi, what I shared is how I was making image references in the entry.txt file. I wasn’t adding any more code except for that.

So with the new version of Kirby, it seems I need to change how I request/reference images. Correct?

Ok, thanks, I missed that you actually put plain HTML into the txt file instead of using an image kirbytag.

Yes, in that case, you have to change how you reference the images, or use a kirbytext hook or field method to replace such src attributes.

Thanks @texnixe that fixed the problem! Very much appreciated.