PHP provides an amazing library called Graphics Draw ( GD ) to generate images. You can create and output the images directly to the browser or you can store it as a image file. For example Google Charts API generates
Setting headers for dynamic images with PHP
![Setting headers for dynamic images with PHP http headers diagram](https://techlister.com/wp-content/uploads/2013/03/http_headers.jpg)