I am trying to do the following in my web application:
<img src="static.example.com/image01.jpg?width=300&height=300" />
Is it possible to have my server (I use Apache in a shared hosting environment) run a PHP script when accessing a .jpg (or any filetype that I chose) instead of just serving the file?
I know that the PHP script has to set the right headers etc, I'm just wondering how it can be run in the first place.
I know this can be done as so :
<img src="static.example.com/get_image.php?name=image_01.jpg&width=300&height=300" />
but that's not how I would like to have it.