My site is running in LAMP, my image CDN is in nginx.
I want to do is: Check if a requested image has a copy in CDN server, if yes then loan the copy in cdn server, otherwise, load the local copy for user.
Is there a programmatically way to check whether the remote CDN image is exist?
(perhaps determine the header? as I notice that if request image isn't exist, it returns 404)