No images generated in media folder

I’m new to Kirby 3 and run into an issue. Images aren’t properly generated in the media folder. The images src in my template seems to be properly generated but the media folder does not contain the corresponding images. The folder is writable. An ideas ? I haven’t found any documentation on the kirby website regarding the media folder or kirby 3 thumbnailing.

When accessing the panel the panel-related stuff gets properly generated. But not for the pages.

A few questions to narrow this down:

  • What exact Kirby 3 version are you using?
  • Are you using any plugins? If yes, which ones?
  • Do you have any config settings reading thumbs in your config.php - or custom folder setup?

I’m using Kirby 3.0.3 with no plugins and no custom folder setup.
My config only contains :

	return [
	    'debug' => true,
	    'languages' => true,
        'date.handler' => 'strftime'
	];

Have you checked if it works without the date.handler setting?

Yes. Doesn’t work either.

And could you share your template code? Maybe something in there.

<?php if ($cover = $item->images()->first()): ?>
<figure class="work-home__cover">
     <img src="<?= $cover->url() ?>" alt="" />
</figure>
<?php endif ?>

and the output

<figure class="work-home__cover">
     <img src="http://127.0.0.1:8000/media/pages/work/project-1/3792425216-1552049473/cover.png" alt="" />
</figure>

Have you used the panel? Are the files for the panel created in the media folder?

Yes. They are created as intended.

I’m out of ideas right now :confused:

Me too. I’ve reinstalled Kirby. Still, same problem. When i access the panel the corresponding files are created in the media folder but not when i access a page containing an image.

Do you get any errors in the console when you use the Panel. Or also have you checked your PHP error log for any hints?

I have the same issue on a docker server using nginx. Are you by any chance also using nginx? Switching to apache works, but is not a real solution.

Im on OSX 10.13.6 using gulp-connect 5.7.0 to create a webserver.
I’m running PHP 7.2.10.

With gulp-connect, you have to use the router.php provided by Kirby: Media is not correctly being generated

1 Like

Thats what i thought but did not found the corresponding file ‘router.php’. Thank you.

@danielschmid Let us know if it works with these changes.

It works. You have to specify a custom ‘router’ like this :

gulp.task('connect', () => {
    gulpConnect.server({
        base: 'public',
        port: 8000,
        router: 'public/kirby/router.php'
    });
});

Thanks @texnixe