Forum Bugs

Prince fails to fetch images for <img> tags

Price fails to fetch images if they are served by a 3rd party host by IP address and port.
When Prince sees it:

<img src=""></img>

It pukes the following message in the console and does not embed the image in the PDF:
prince: warning: Could not load PNG file

If I move our images to the same host that serves HTML and replace links with relative ones, i.e. "/statics/image12.gif" then it works, but in production we'll be using a CDN so that's not an option.
The issue here is that the GIF file is being served up with the wrong MIME type, as a PNG file. The MIME type should be "image/gif", not "image/png", in order for it to be interpreted correctly. This is generally a server configuration issue, which is why it goes away when using a different server.
Prince 8.0 now tries harder to load images that are incorrectly assigned the wrong MIME type, which should solve this issue.