Forum How do I...?

How do we improve performance of images when generating PDFs

We have a scenario where we have users printing out a directory of people's information along with their avatar. The avatar points to a URL (http://....) and is not base64 encoded.

The problem that we are facing is when there are thousands of people meaning thousands of avatars, our server times out. As soon as we remove images from the data, the PDF generates instantly.

If we reduce the amount of images, we can generate the file.

Are there any techniques that will help improve the performance of images?

Edited by elvanto

It depends on where the bottleneck is: establishing the network connections and downloading the images or too much load on the server itself. How big are these avatar images? Are they all stored on the same server? How does it perform when there are fewer images, like a hundred?