Media links lost on migration

Hi!
I’m a bit confused on how the media are handled in the new Kirby…
When moving the media and content folders from one instal (online) to another (local), I seem to have lost all links to the images…
What am I missing here?
Thank you!

There is no need to move the media folder, all the files are recreated anyway.

Well if I erase what’s in the media folder, I lose all the images as well…
What am I doing wrong?
Thank you @texnixe

No, all images are in your content folder and moved to the media folder. The same will happen again, i.e. files moved again from content to media folder.

Maybe it is some sort of caching problem, not sure, but as I said, everything will be recreated.

The media folder is like a cache. It gets generated from the media in your content folders. You shouldn’t put things directly in the media folder.

OK my bad.
I was using running the local website the old way without kirby/router.php.
old habits…
Thanks for coping with me…

Maybe create a nice alias for that? run kirby or something like that…

I’m having some trouble with the media folder. I’ve changed a “resize” parameter to 80, and it seems like none of the images have been updated. When I look at the image size on my local machine, it’s like 300-400k, but online, each image is like 3 or 4 megabytes. When I download an image, the url has the dimensions and the quality in the filename as it should, but it’s still the full size 100% quality image. Any idea what’s going on?

http://li1116-113.members.linode.com/levonbiss/projects/sport

local machine:
54%20PM
file generated online:
11%20PM

Have you pushed the media folder from local to the server?

I did, but then I deleted the whole thing. this is after it has been regenerated.

I know I was having trouble with file permissions, but I think I fixed that. Not sure if it’s related… I know also that it takes two page loads for the images to show up at all, even really small ones in the panel.

Do thumbnails actually get generated at all?

I didn’t have gd installed. that will do it. :sob: These are the dangers of starting from scratch with linode, kids.

Hi there,

Even though this is an old thread, I ran into a similar problem. I had to migrate my website, i.e. downloaded it through FileZilla and pushed it to the new server. However, now the links to the images on the site are broken. So what I did was to update to Kirby 5.3, delete the “/media/” folder and let Kirby regenerate it. However, this didn’t work and I would appreciate if someone could help me out here. What did I do wrong? This is the website: https://swift4data.com.

The weird thing is that with the other website I migrated everything seemed to have worked well.

Looking forward to hearing from you.

Kind regards.
Johannes

What thumb driver is defined in your config, if any?

In my config.php (/site/config/config.php) I don’t see anything about “thumb”. I assume that it is not defined then, right?

If it is not defined, the default gd library is used. Have you made sure it is enabled? Maybe check your cPanel options or check with phpinfo(). The media folder itself seems to be writable, because non-thumb images work fine.

Thanks for your reply, @texnixe! I appreciate your help with this as I’m still not very experienced in all this.

In the meantime I added the gd driver to the config.php. Also I managed to confirm via SSH access to the server that it is enabled. Using this command: "php -i | grep -A 20 gd > gd.html” I managed to produce this:

I also tried already deleting the “/media” folder and the content of the “/site/cache” folder, but this didn’t solve the problem.

Do you have any other ideas?

Just to be on the safe side, please temporarily put phpinfo() into a template and check the output. The php version on the command line and the php version actually used by the server might differ.

The output I get from the phpinfo() from the website is PHP Version 8.4.17 (which is weird because in the settings of my webspace provider I set PHP 8.3) while via the command line php -v I get:

PHP 8.3.30 (cgi-fcgi) (built: Jan 20 2026 13:06:52)

Copyright (c) The PHP Group

Zend Engine v4.3.30, Copyright (c) Zend Technologies”

:face_with_raised_eyebrow:

Two additional pieces of information:

  • I have PHP Boost activated via the admin account at my webspace provider
  • I downloaded the entire folder of the website and called it locally. There all the images appear as they should.