wkhtmltopdf won't display jpg images

1.2k Views Asked by At

I'm having a bit of a problem with wkhtmltopdf. It won't display jpg images but works perfectly with png images. I've tried converting the images to base64 and inserting them directly into my html. When i render the html it works, but it won't when i pass the html file to wkhtmltopdf.

I get no error from when i execute the command and the PDF is generated smoothly, it just lacks the images.

I'm using wkhtmltopdf 0.12.3.2 on Debian 9 Stretch.

Does anyone have the same issues ?

1

There are 1 best solutions below

0
LyesB On

I upgraded to wkhtmltopdf 0.12.5 and it solved the problem

For those who have the same problem, here is how I managed to upgrade:

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb

sudo dpkg -i wkhtmltox_0.12.5-1.stretch_amd64.deb

sudo apt-get install -f

sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin

sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin