I am using wkhtmltopdf for make pdf but anything work except image that doesn't display.How fix?
IN localhost:3000 it work but when deploy on server it does't work.
I am using wkhtmltopdf for make pdf but anything work except image that doesn't display.How fix?
IN localhost:3000 it work but when deploy on server it does't work.
This could be related to an issue wkhtmltopdf has with SSL. Do you access the production server via HTTPS? If so, use absolute paths rather than relative paths to your image resources. That means:
wont work:
<img src="/image.jpg" alt="" />
might work:
<img src="https://example.com/image.jpg" alt="" />
If this solves your issue, the following thread might provide further solutions if you want to avoid this workaround: wkhtmltopdf issues rending images from HTTPS on GitHub