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
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
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.
OSX 10.13.6 using
gulp-connect 5.7.0 to create a webserver.
With gulp-connect, you have to use the router.php provided by Kirby: Media is not correctly being generated
Thats what i thought but did not found the corresponding file ‘router.php’. Thank you.