When referencing an external image in a Visualforce PDF rendered image, the image is displaying a broken link. It works perfectly without the renderAs="PDF".


I just figured this out after 30 minutes of Googling and thought a concise post may help others in future. It was not documented in the SFDC documentation but was on an different post from 2012.

Is it possible to use images in Visualforce generated PDFs which are not static resources?

The issue was that the PDF rendering engine runs under the same security restrictions as Apex. In other words, the external URL must be allowed in the remote site settings to be used by the renderer.

  • yes exactly ... – Ratan Paul May 5 '16 at 14:07
  • Remote Site Settings totally worked for me since the images are hosted on AWS S3. Thank you for the tip. – Tyler Jul 13 '17 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.