Snappy does not render image in pdf?

0

I'm using Snappy to generate reports, however it's not rendering the image I load in my html, what can it be?

Code:

Route::get('/report', function(){
        $pdf = PDF::loadView('templates.report');
        return $pdf->stream();
});
<table border="1" cellpadding="2" cellspacing="0" width="1024">
    <tr>
        <td width="100">
            <img src="/img/logo.png" alt=""/>
        </td>
        <td>

            <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="text-align: center;">
                        <h2>Helpdesk Vicentino's</h2>
                    </td>
                </tr>
            </table>

        </td>
    </tr>
</table>

In the left square you should load the image. Thanks in advance for the community.

    
asked by anonymous 26.07.2016 / 14:50

2 answers

0

I was able to resolve using the image address on ftp. But if anyone knows why it did not work with local directory, please let me know = /.

    
27.07.2016 / 13:14
2

You must pass the absolute path of the image.

Example: <img src="http://localhost/sistema/img/logo.png"alt=""/>

    
19.01.2017 / 18:17