How can optimize images created in real time? I have a php file that creates chess diagrams with FEN in real time. I use ~12 of those chess diagrams on my main web page at http://communitychessclub.com/index.php
Is there a way I could pipe or tee the img url?
It seems that these image don't change on every request, so you should definitely cache them. Make hash (sha1, md5) string from attributes for file name and save them as jpegs. On every page request check if file exist, if not, generate, cache and return it. It will be way faster.
To optimize more you could use ajax. Return page with placeholders for images, then load each image with ajax and replace placeholders.