Logo not being displayed in invoice pdf attached to email

When I ceck pdf I am able to see the logo but when we directly mail invoice to customer logo is not getting render in pdf invoice.

I resolved it by specifying “host_name”: “http://yoursiteurl”, in site_config.json .