First image not showing


I've made a regular Fuel-layout CMS page with a lot of fields.
In one of the textarea fields this is in the codeview of the editor in the backend:

<p>Text is here</p>

<p><img alt="" src="{img_path('Inkomen20202021.png')}" /></p>

<p><img alt="" src="{img_path('Inkomen20202021.png')}" /></p>

<p><strong>Let op!</strong></p>

But the front-end renders this:

<p>Text is here</p>

<p><img alt="" src="{img_path(.pdf"></p>

<p><img alt="" src="/assets/utrecht/images/Inkomen20202021.png"></p>

<p><strong>Let op!</strong></p>

Why is the first, exactly the same image, not rendered correctly?


  • Clear the Fuel cache. Or stay logged into Fuel as you develop. I'm betting your code had an error, you fixed it, but the page is still displaying the cached version?

  • Can you see what is actually saved in the database? That will tell us if it's a front end rendering issue or a CMS backend saving issue.

  • Thanks for your feedback. The Fuel cache is cleared. It's not a cached version.
    In the image below you can see that it's correct in the database. But the page just renders it wrong.


  • If you move the image to somewhere else in the content does it work? There seems to be something in the HTML that is throwing off the Dwoo parser for allowed functions. Also, what is the HTML for including it in your template?

  • edited July 2020

    The same image works on every other page in the website. This is the HTML block for this part of the page:

    <div class="row faq">
      <div class="col-xs-11 col-sm-11 col-md-9 col-xs-offset-1 col-md-offset-1 col-sm-offset-1">    
    $titlenr = 1;
    for ($x = 0; $x <= 99; $x++) {
        $vraag = "vraag".$x;
        $antwoord = "antwoord".$x;
        if ($x == 0 || $x == 21 || $x == 41 || $x == 61 || $x == 81){ ?>
              <h4 class="rood"><?php echo fuel_var('sectie_titel'.$titlenr); ?></h4>
          <?php $titlenr ++; } ?>
        <?php if(strlen(fuel_var($vraag)) > 25){ ?>
        <div class="panel-group" role="tablist" aria-multiselectable="true">
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="heading<?php echo $x; ?>">
                  <h5 class="panel-title"> <a role="button" data-toggle="collapse" data-parent="#accordion" href="#vraag<?php echo $x; ?>" aria-expanded="true" aria-controls="vraag<?php echo $x; ?>"> <i class="more-less faq-plus"></i>
                    <ol start="1">
                      <li><?php echo fuel_var($vraag); ?></li>
                    </a> </h5>
                <div id="vraag<?php echo $x; ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading<?php echo $x; ?>">
                  <div class="panel-body"><?php echo fuel_var($antwoord); ?></div>
            </div><!-- END PANEL -->
        </div><!-- END PANEL-GROUP -->
  • Please remove the url if you have checked it.

  • Sorry, but I can't really debug this type of issue on the forum easily. I would suggest perhaps working backwards from a page where it does work correctly or even simply taking the raw HTML from the database and placing it in the template directly to see if the img_path functions get parsed correctly (taking the variable merging part out of the equation).

Sign In or Register to comment.