Blog directory not show images correctly

Hey there,

Am trying to get a simple blog up and running but cannot seem to get the article listing (blog page) to display relative images using kirbytext() inside each article.

Blog Page:

 // foreach...
 echo $article->text()->kirbytext() 

Content in the article:

Blah blah (image: myprettyimage.jpg) blah blah


What is the result you get? An empty figure/image tag? First thing that comes to mind is that there is no such image in the article folder …

Is the name of the picture accurately identical to

[quote=“Boycce, post:1, topic:687”]
[/quote] ???

That means no capital letter in the whole name and extension!

Thanks for your replies @texnixe @anon77445132!

This is the output I am receiving on the blog page which is incorrect:

  <img src="">

And the correct output looks like this on the article page.

  <img src="">

Is that on the new Kirby 2.1 beta? That should usually work without any problem, so I wonder if you use any routes or rewrite doesn’t work properly?

Hey there,
no routes or special htaccess other than the defaults. I am work offing Kirby 2.0.6


Which version of apache and which version of PHP do you use there?

Is the .htaccess file in the root of your Kirby root?

Hey there, yes the .htaccess is in root.

Apache 2.4.7
PHP 5.4.16

My site.php

  $kirby  = kirby();
  $domain = server::get('server_name');
  $kirby->urls->index = url::scheme() . '://' . $domain;

  // custom roots
  $kirby->roots->site    = __DIR__ . DS . 'server';
  $kirby->roots->content = __DIR__ . DS . 'public' . DS . 'content';
  $kirby->roots->assets  = __DIR__ . DS . 'public' . DS . 'assets';
  $kirby->roots->avatars = __DIR__ . DS . 'public' . DS . 'avatars';
  $kirby->roots->thumbs  = __DIR__ . DS . 'public' . DS . 'thumbs';

  // custom urls
  $kirby->urls->content  = $kirby->urls->index . '/public/content';
  $kirby->urls->assets   = $kirby->urls->index . '/public/assets';
  $kirby->urls->avatars  = $kirby->urls->index . '/public/avatars';
  $kirby->urls->thumbs   = $kirby->urls->index . '/public/thumbs';

Your cache is empty?


I had a simple excerpt condition which I stupidly didn’t mention to you guys:

$text = $article->text();

if (strpos($text, '(more:)') === FALSE) {
  echo kirbytext($text);

} else {
  echo kirbytext(strstr($text, '(more:)', true));

I changed this line below, and now all images work as normal.
```echo strstr(kirbytext($text), ‘(more:)’, true);````